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