#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
char num[maxn];
char num2[maxn];
vector<int> vec;
queue<int> que;
inline int read() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  int n = read(), sx = read(), sy = read();
  int s1 = 0, s2 = 0, s3 = 0, s4 = 0;
  int u = 0, d = 0, l = 0, r = 0;
  for (int i = 1; i <= n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (x < sx) {
      if (y < sy) {
        s2++;
        s4++;
      } else if (y > sy) {
        s2++;
        s3++;
      } else if (y == sy) {
        d++;
      }
    } else if (x > sx) {
      if (y < sy) {
        s1++;
        s4++;
      } else if (y > sy) {
        s1++;
        s3++;
      } else {
        u++;
      }
    } else if (x == sx) {
      if (y < sy) {
        l++;
      } else if (y > sy) {
        r++;
      } else {
        continue;
      }
    }
  }
  int num1 = s1 + u;
  int num2 = s3 + r;
  int num3 = s2 + d;
  int num4 = s4 + l;
  if (num1 >= num2 && num1 > num3 && num1 >= num4) {
    printf("%d\n", num1);
    printf("%d %d\n", sx + 1, sy);
  } else if (num2 >= num1 && num2 > num3 && num2 >= num4) {
    cout << num2 << endl;
    printf("%d %d\n", sx, sy + 1);
  } else if (num3 >= num2 && num3 > num1 && num3 >= num4) {
    cout << num3 << endl;
    printf("%d %d\n", sx - 1, sy);
  } else if (num4 >= num2 && num4 > num3 && num4 >= num1) {
    cout << num4 << endl;
    printf("%d %d\n", sx, sy - 1);
  }
  return 0;
}
