#include <bits/stdc++.h>
using namespace std;
inline int in() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
set<int> now;
set<int>::iterator it;
const int N = 2e5 + 5;
int n, s, t;
int x, y;
int main() {
  scanf("%d%d%d", &n, &s, &t);
  long long s1 = 0;
  long long s2 = 0;
  long long s3 = 0;
  long long s4 = 0;
  for (register int i = 1; i <= n; i++) {
    scanf("%d%d", &x, &y);
    if (y > t)
      s3++;
    else if (y < t)
      s4++;
    if (x > s)
      s1++;
    else if (x < s)
      s2++;
  }
  long long ans1 = max(max(s1, s2), max(s3, s4));
  cout << ans1 << endl;
  if (s1 == ans1) {
    cout << s + 1 << " " << t << endl;
    return 0;
  }
  if (s3 == ans1) {
    cout << s << " " << t + 1 << endl;
    return 0;
  }
  if (s2 == ans1) {
    cout << s - 1 << " " << t << endl;
    return 0;
  }
  if (s4 == ans1) {
    cout << s << " " << t - 1 << endl;
    return 0;
  }
  return 0;
}
