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;
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 (sx == 0 && sy == 0) {
    if (b[1] > b[2])
      cout << b[1] + a[2] << endl << 1 << " " << 0 << endl;
    else
      cout << b[2] + a[2] << endl << 0 << " " << 1 << endl;
    return 0;
  } else if (sx == 1e9 && sy == 1e9) {
    if (b[3] > b[4])
      cout << b[3] + a[4] << endl << 1e9 - 1 << " " << 1e9 << endl;
    else
      cout << b[4] + a[4] << endl << 1e9 << " " << 1e9 - 1 << endl;
  }
  while (ex > 1e9) sx--;
  while (ex < 0) ex++;
  while (ey > 1e9) ey--;
  while (ey < 0) ey++;
  if (ma == 0)
    cout << 0 << endl;
  else {
    cout << ma << endl << ex << " " << ey << endl;
  }
  return 0;
}
