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() {
  int n, xo, yo;
  cin >> n >> xo >> yo;
  int l = 0, r = 0, u = 0, d = 0;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    long long int a = x + y - xo - yo;
    long long int b = y + xo - x - yo;
    if (a == 0 && b > 0) {
      l++;
      u++;
    } else if (a == 0 && b < 0) {
      r++;
      d++;
    } else if (a > 0 && b == 0) {
      u++;
      r++;
    } else if (a < 0 && b == 0) {
      l++;
      d++;
    } else if (a > 0 && b > 0) {
      u++;
    } else if (a > 0 && b < 0) {
      r++;
    } else if (a < 0 && b < 0) {
      d++;
    } else {
      l++;
    }
  }
  cout << max({l, r, u, d}) << endl;
  int dummy = max({l, r, u, d});
  if (dummy == l)
    cout << xo - 1 << " " << yo;
  else if (dummy == r)
    cout << xo + 1 << " " << yo;
  else if (dummy == u)
    cout << xo << " " << yo + 1;
  else if (dummy == d)
    cout << xo << " " << yo - 1;
}
