#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int a, b, x, y, i, j;
int main() {
  cin >> x >> y >> a >> b;
  for (i = a; i <= x; i++)
    for (j = b; j <= y; j++)
      if (j < i) v.push_back(make_pair(i, j));
  sort(v.begin(), v.end());
  cout << v.size() << endl;
  for (i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
  return 0;
}
