#include <bits/stdc++.h>
using namespace std;
int t, n;
int a[5], b[5];
int x, y, sx, sy;
int main() {
  cin >> n >> sx >> sy;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    if (x == sx && y < sy)
      b[4]++;
    else if (x == sx && y > sy)
      b[2]++;
    else if (y == sy && x < sx)
      b[3]++;
    else if (y == sy)
      b[1]++;
    else if (x < sx && y < sy)
      a[4]++;
    else if (x < sx && y > sy)
      a[3]++;
    else if (x > sx && y > sy)
      a[2]++;
    else if (x > sx && y < sy)
      a[1]++;
  }
  int ma = 0;
  int ex, ey;
  if (a[1] + a[2] + b[1] > ma) {
    ma = a[1] + a[2] + b[1];
    ex = sx + 1;
    ey = sy;
  }
  if (a[2] + a[3] + b[2] > ma) {
    ma = a[2] + a[3] + b[2];
    ex = sx;
    ey = sy + 1;
  }
  if (a[3] + a[4] + b[3] > ma) {
    ma = a[3] + a[4] + b[3];
    ex = sx - 1;
    ey = sy;
  }
  if (a[1] + a[4] + b[4] > ma) {
    ma = a[1] + a[4] + b[4];
    ex = sx;
    ey = sy - 1;
  }
  if (ma == 0)
    cout << 0 << endl;
  else {
    cout << ma << endl << ex << " " << ey << endl;
  }
  return 0;
}
