#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > vet;
int main() {
  int x, y, a, b;
  scanf("%d %d %d %d", &x, &y, &a, &b);
  for (int i = int(a); i <= int(x); i++)
    for (int j = int(b); j <= int(min(y, i - 1)); j++)
      vet.push_back(make_pair(i, j));
  printf("%d\n", vet.size());
  for (int i = int(0); i <= int(vet.size() - 1); i++)
    printf("%d %d\n", vet[i].first, vet[i].second);
  return 0;
}
