#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int> > pares;
  int tomadosx, tomadosy, lessx, lessy;
  cin >> tomadosx >> tomadosy >> lessx >> lessy;
  int i, j;
  for (i = lessx; i <= tomadosx; i++)
    for (j = lessy; j <= tomadosy && j < i; j++)
      pares.push_back(make_pair(i, j));
  cout << pares.size() << endl;
  for (i = 0; i < pares.size(); i++)
    cout << pares[i].first << " " << pares[i].second << endl;
}
