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;
bool isprime[100005];
void SOE() {
  memset(isprime, true, sizeof(isprime));
  isprime[1] = false;
  for (size_t i = size_t(2); i < size_t(100005); i++) {
    if (isprime[i]) {
      for (size_t j = size_t(i + i); j < size_t(100005); j++) {
        isprime[j] = false;
        j += i - 1;
      }
    }
  }
}
long long int power(long long int x, unsigned long long int y,
                    long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    long long int n, sx, sy;
    cin >> n >> sx >> sy;
    long long int l = 0, r = 0, d = 0, u = 0;
    for (size_t i = size_t(0); i < size_t(n); i++) {
      long long int x, y;
      cin >> x >> y;
      if (x < sx) l++;
      if (x > sx) r++;
      if (y < sy) d++;
      if (y > sy) u++;
    }
    long long int ans = max(max(max(l, r), d), u);
    cout << ans << "\n";
    if (ans == l)
      cout << sx - 1 << " " << sy;
    else if (ans == r)
      cout << sx + 1 << " " << sy;
    else if (ans == u)
      cout << sx << " " << sy + 1;
    else
      cout << sx << " " << sy - 1;
  }
}
