#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const int N = 2e5 + 2;
int main() {
  int n, sx, sy;
  scanf("%d", &n);
  scanf("%d", &sx);
  scanf("%d", &sy);
  int l, r, u, d;
  l = r = u = d = 0;
  for (int i = 0; i < (int)n; i++) {
    int hx, hy;
    scanf("%d", &hx);
    scanf("%d", &hy);
    if (hx < sx) l++;
    if (hx > sx) r++;
    if (hy < sy) d++;
    if (hy > sy) u++;
  }
  int mx = max({l, r, u, d});
  if (mx == l) {
    printf("%d\n", (int)mx);
    printf("%d ", (int)sx - 1);
    printf("%d\n", (int)sy);
  } else if (mx == r) {
    printf("%d\n", (int)mx);
    printf("%d ", (int)sx + 1);
    printf("%d\n", (int)sy);
  } else if (mx == u) {
    printf("%d\n", (int)mx);
    printf("%d ", (int)sx);
    printf("%d\n", (int)sy + 1);
  } else if (mx == d) {
    printf("%d\n", (int)mx);
    printf("%d ", (int)sx);
    printf("%d\n", (int)sy - 1);
  }
  return 0;
}
