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;
struct punkt {
  int x;
  int y;
};
punkt tab[200007];
int main() {
  int n, sx, sy, i, wd = 0, wg = 0, wl = 0, wp = 0, w;
  cin >> n >> sx >> sy;
  for (i = 0; i < n; i++) {
    cin >> tab[i].x >> tab[i].y;
    if (tab[i].x < sx) {
      wl++;
    }
    if (tab[i].x > sx) {
      wp++;
    }
    if (tab[i].y < sy) {
      wd++;
    }
    if (tab[i].y > sy) {
      wg++;
    }
  }
  w = max(max(wd, wg), max(wl, wp));
  cout << w << '\n';
  if (w == wd) {
    cout << sx << ' ' << sy - 1 << '\n';
    return 0;
  }
  if (w == wp) {
    cout << sx + 1 << ' ' << sy << '\n';
    return 0;
  }
  if (w == wl) {
    cout << sx - 1 << ' ' << sy << '\n';
    return 0;
  }
  if (w == wg) {
    cout << sx << ' ' << sy + 1 << '\n';
    return 0;
  }
  return 0;
}
