#include <bits/stdc++.h>
using namespace std;
const int INF = (int)(INT_MAX / 2);
const int N = (int)(0);
const long long mod = (int)(1e+9 + 7);
int n, m, a, b, x, y, k, k1, k2, s, ans, pos, last, cnt, tam;
int main() {
  scanf("%d", &x), scanf("%d", &y), scanf("%d", &a), scanf("%d", &b);
  x++, y++;
  vector<pair<int, int> > v;
  a = max(a, b + 1);
  for (int i = a; i < x; i++)
    for (int j = b; j < y; j++)
      if (i > j) v.push_back({i, j});
  printf("%d\n", int(v.size()));
  for (int i = 0; i < int(v.size()); i++)
    cout << v[i].first << " " << v[i].second << '\n';
  return 0;
}
