#include <bits/stdc++.h>
using namespace std;
void solve() {
  long int n, sx, sy;
  cin >> n >> sx >> sy;
  long int x, y;
  long int u = 0, d = 0, l = 0, r = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    cin >> y;
    if (x >= sx and y >= sy) {
      if (abs(sx + 1 - x) + abs(y - sy) < abs(x - sx) + abs(sy + 1 - y))
        r++;
      else if (abs(sx + 1 - x) + abs(y - sy) > abs(x - sx) + abs(sy + 1 - y))
        u++;
      else {
        u++;
        r++;
      }
    } else if (x >= sx and y <= sy) {
      if (abs(sx + 1 - x) + abs(y - sy) < abs(x - sx) + abs(sy - 1 - y))
        r++;
      else if (abs(sx + 1 - x) + abs(y - sy) > abs(x - sx) + abs(sy - 1 - y))
        d++;
      else {
        r++;
        d++;
      }
    } else if (x <= sx and y <= sy) {
      if (abs(sx - 1 - x) + abs(y - sy) < abs(x - sx) + abs(sy - 1 - y))
        l++;
      else if (abs(sx - 1 - x) + abs(y - sy) > abs(x - sx) + abs(sy - 1 - y))
        d++;
      else {
        l++;
        d++;
      }
    } else {
      if (abs(sx - 1 - x) + abs(y - sy) < abs(x - sx) + abs(sy + 1 - y))
        l++;
      else if (abs(sx - 1 - x) + abs(y - sy) > abs(x - sx) + abs(sy + 1 - y))
        u++;
      else {
        l++;
        u++;
      }
    }
  }
  long int maxx = max({u, d, l, r});
  if (maxx == u and sy + 1 <= 1000000000) {
    cout << u << endl;
    cout << sx << " " << sy + 1 << endl;
  } else if (maxx == d and sy - 1 >= 0) {
    cout << d << endl;
    cout << sx << " " << sy - 1 << endl;
  } else if (maxx == l and sx - 1 >= 0) {
    cout << l << endl;
    cout << sx - 1 << " " << sy << endl;
  } else {
    cout << r << endl;
    cout << sx + 1 << " " << sy << endl;
  }
}
int main() {
  long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
