1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100
#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 (x == s) {
      if (y > t)
        s3++;
      else if (y < t)
        s4++;
      continue;
    }
    if (x > s)
      s1++;
    else
      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;
}
