#include <bits/stdc++.h>
using namespace std;
const int mxn = 200005;
pair<int, int> arr[mxn];
int n, sx, sy;
int ans, ax, ay;
int tmp;
bool ok(int i, int a, int b) {
  if (a > sx) {
    return (arr[i].first > sx);
  } else if (a < sx) {
    return (arr[i].first < sx);
  } else if (b > sy) {
    return (arr[i].second > sy);
  } else if (b < sy) {
    return (arr[i].second < sy);
  }
}
void go(int a, int b) {
  if (a < 0 || b < 0 || a > 1e9 || b > 1e9) return;
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (ok(i, a, b)) count++;
  }
  if (ans < count) {
    ans = count;
    ax = a;
    ay = b;
  }
}
void solve() {
  ans = ax = ay = 0;
  go(sx + 1, sy);
  go(sx - 1, sy);
  go(sx, sy - 1);
  go(sx, sy + 1);
  cout << ans << '\n' << ax << " " << ay << '\n';
}
void read() {
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    cin >> arr[i].first >> arr[i].second;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int T = 1;
  while (T--) read(), solve();
  return 0;
}
