#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, a, b, s, c, d;
  cin >> x >> y >> a >> b;
  s = 0;
  for (c = a; c <= x; c++)
    for (d = b; d <= y; d++)
      if (c > d) s++;
  cout << s << endl;
  for (c = a; c <= x; c++)
    for (d = b; d <= y; d++)
      if (c > d) cout << c << " " << d << endl;
  return 0;
}
