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