#include <bits/stdc++.h>
const long long int N = 2e5 + 5;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int x, y, a, b;
  cin >> x >> y >> a >> b;
  vector<pair<long long int, long long int>> mp;
  for (int i = a; i <= x; i++) {
    for (int j = b; j <= y; j++) {
      if (i <= j)
        continue;
      else {
        mp.push_back({i, j});
      }
    }
  }
  cout << mp.size() << endl;
  for (int i = 0; i < mp.size(); i++) {
    cout << mp[i].first << " " << mp[i].second << endl;
  }
}
