#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1.0);
const long double eps = 1e-9;
const double INF = 100000000000.0;
const long long MOD = 1000000009;
const int MAXN = 102400;
int main() {
  int x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<pair<int, int> > ans;
  for (int i = a; i <= x; ++i)
    for (int j = b; j <= min(i - 1, y); ++j) {
      ans.push_back(pair<int, int>(i, j));
    }
  cout << ans.size() << endl;
  for (long long i = 0; i < (long long)(ans).size(); ++i)
    printf("%d %d\n", ans[i].first, ans[i].second);
}
