#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  ;
  int x, y, a, b, cnt = 0, i, j;
  cin >> x >> y >> a >> b;
  vector<pair<int, int>> ans;
  for (i = a; i <= x; i++) {
    for (j = b; j <= min(i - 1, y); j++) {
      cnt++;
      ans.push_back({i, j});
    }
  }
  cout << cnt << '\n';
  for (auto e : ans) cout << e.first << " " << e.second << '\n';
}
