1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100
#include <bits/stdc++.h>
using namespace std;
void solve() {
  long int n, sx, sy;
  cin >> n >> sx >> sy;
  long int x, y;
  long int u = 0, d = 0, l = 0, r = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    cin >> y;
    if (x >= sx and y >= sy) {
      if (abs(sx + 1 - x) + abs(y - sy) < abs(x - sx) + abs(sy + 1 - y))
        r++;
      else if (abs(sx + 1 - x) + abs(y - sy) > abs(x - sx) + abs(sy + 1 - y))
        u++;
      else {
        u++;
        r++;
      }
    } else if (x >= sx and y <= sy) {
      if (abs(sx + 1 - x) + abs(y - sy) < abs(x - sx) + abs(sy - 1 - y))
        r++;
      else if (abs(sx + 1 - x) + abs(y - sy) > abs(x - sx) + abs(sy - 1 - y))
        d++;
      else {
        r++;
        d++;
      }
    } else if (x <= sx and y <= sy) {
      if (abs(sx - 1 - x) + abs(y - sy) < abs(x - sx) + abs(sy - 1 - y))
        l++;
      else if (abs(sx - 1 - x) + abs(y - sy) > abs(x - sx) + abs(sy - 1 - y))
        d++;
      else {
        l++;
        d++;
      }
    } else {
      if (abs(sx - 1 - x) + abs(y - sy) < abs(x - sx) + abs(sy + 1 - y))
        l++;
      else if (abs(sx - 1 - x) + abs(y - sy) > abs(x - sx) + abs(sy + 1 - y))
        u++;
      else {
        l++;
        u++;
      }
    }
  }
  long int maxx = max({u, d, l, r});
  if (maxx == u and sy + 1 <= 1000000000) {
    cout << u << endl;
    cout << sx << " " << sy + 1 << endl;
  } else if (maxx == d and sy - 1 >= 0) {
    cout << d << endl;
    cout << sx << " " << sy - 1 << endl;
  } else if (maxx == l and sx - 1 >= 0) {
    cout << l << endl;
    cout << sx - 1 << " " << sy << endl;
  } else {
    cout << r << endl;
    cout << sx + 1 << " " << sy << endl;
  }
  cout << u << d << l << r << endl;
}
int main() {
  long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
