#include <bits/stdc++.h>
using namespace std;
int n, X, Y, x, y, m, l, r, u, d, i;
int main() {
  cin >> n >> X >> Y;
  for (; i < n; i++) {
    cin >> x >> y;
    if (x < X) l++;
    if (x > X) r++;
    if (y < Y) d++;
    if (y > Y) u++;
  }
  m = max(max(l, r), max(d, u));
  if (m == l)
    X--;
  else if (m == r)
    X++;
  else if (m == d)
    Y--;
  else
    Y++;
  cout << m << '\n' << X << ' ' << Y;
}
