#include <bits/stdc++.h>
int main() {
  std::ios::sync_with_stdio(0);
  std::cin.tie(0);
  std::cout.tie(0);
  int x, y, a, b;
  std::cin >> x >> y >> a >> b;
  int rs = 0;
  std::string st = "";
  for (int i = a; i <= x; ++i)
    for (int j = b; j <= y; ++j)
      if (i > j) ++rs, st += std::to_string(i) + " " + std::to_string(j) + "\n";
  std::cout << rs << '\n';
  std::cout << st;
}
