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;
long long mod = 1000000000 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long T;
  T = 1;
start:
  while (T--) {
    long long n, sx, sy;
    cin >> n >> sx >> sy;
    long long u = 0, d = 0, l = 0, r = 0;
    for (long long i = 0; i < n; i++) {
      long long x, y;
      cin >> x >> y;
      if (x == sx) {
        if (y > sy) {
          u++;
        } else {
          d++;
        }
      } else if (y == sy) {
        if (x > sx) {
          r++;
        } else {
          l++;
        }
      } else if (x < sx && y > sy) {
        l++;
        u++;
      } else if (x < sx && y < sy) {
        l++;
        d++;
      } else if (x > sx && y > sy) {
        r++;
        u++;
      } else if (x > sx && y < sy) {
        r++;
        d++;
      }
    }
    long long e = max(max(l, r), max(u, d));
    cout << e << endl;
    if (e == u) {
      cout << sx << " " << sy + 1 << endl;
    } else if (e == l) {
      cout << sx - 1 << " " << sy << endl;
    } else if (e == r) {
      cout << sx + 1 << " " << sy << endl;
    } else {
      cout << sx << " " << sy - 1 << endl;
    }
  }
  return 0;
}
