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 main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int nn, sx, sy;
  int n = 0, s = 0, w = 0, e = 0;
  long long int x, y;
  cin >> nn;
  cin >> sx;
  cin >> sy;
  for (int i = 0; i < nn; i++) {
    cin >> x;
    cin >> y;
    if (x < sx)
      w++;
    else if (x > sx)
      e++;
    if (y < sy)
      s++;
    else if (n > sy)
      s++;
  }
  if ((n >= s) && (n >= e) && (n >= w)) {
    cout << n << endl << sx << " " << sy + 1;
    return 0;
  } else if ((s >= n) && (s >= e) && (s >= w)) {
    cout << s << endl << sx << " " << sy - 1;
    return 0;
  } else if ((e >= w) && (e >= n) && (e >= s)) {
    cout << e << endl << sx + 1 << " " << sy;
    return 0;
  } else if ((w >= e) && (w >= n) && (w >= s)) {
    cout << w << endl << sx - 1 << " " << sy;
    return 0;
  }
  return 0;
}
