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 int64_t max(int64_t a, int64_t b) { return (a > b) ? a : b; }
inline int64_t min(int64_t a, int64_t b) { return (a < b) ? a : b; }
inline int64_t max3(int64_t a, int64_t b, int64_t c) {
  return max(a, max(b, c));
}
inline int64_t min3(int64_t a, int64_t b, int64_t c) {
  return min(a, min(b, c));
}
int64_t gcd(int64_t a, int64_t b) { return (a % b == 0) ? b : gcd(b, a % b); }
int64_t pow3(int64_t a, int64_t b, int64_t m = 1000000007) {
  int64_t res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return res;
}
void solve() {
  int64_t n, sx, sy;
  cin >> n >> sx >> sy;
  pair<int64_t, int64_t> s[n];
  for (int64_t i = 0; i < n; i++) cin >> s[i].first >> s[i].second;
  for (int64_t i = 0; i < n; i++) {
    s[i].first -= sx;
    s[i].second -= sy;
  }
  int64_t q1 = 0, q2 = 0, q3 = 0, q4 = 0;
  int64_t a1 = 0, a2 = 0, a3 = 0, a4 = 0;
  for (int64_t i = 0; i < n; i++) {
    if (s[i].first > 0) {
      if (s[i].second > 0) q1++;
      if (s[i].second == 0) a1++;
      if (s[i].second < 0) q4++;
    } else if (s[i].first == 0) {
      if (s[i].second > 0)
        a2++;
      else if (s[i].second < 0)
        a4++;
    } else if (s[i].first < 0) {
      if (s[i].second > 0)
        q2++;
      else if (s[i].second == 0)
        a3++;
      else if (s[i].second < 0)
        q3++;
    }
  }
  int64_t ans = q1 + q4 + a1;
  pair<int64_t, int64_t> p = make_pair(1, 0);
  if (q2 + q1 + a2 > ans) {
    ans = q2 + q1 + a2;
    p = make_pair(0, 1);
  }
  if (q3 + q4 + a3 > ans) {
    ans = q2 + q3 + a3;
    p = make_pair(-1, 0);
  }
  if (q3 + q4 + a4 > ans) {
    ans = q3 + q4 + a4;
    p = make_pair(0, -1);
  }
  cout << ans << endl;
  cout << p.first + sx << " " << p.second + sy << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int q = 1;
  while (q--) {
    solve();
  }
  return 0;
}
