#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 10;
pair<int, int> A[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int N, x, y;
  cin >> N >> x >> y;
  for (int i = 0; i < N; i++) cin >> A[i].first >> A[i].second;
  int res = 0;
  int xx = 0;
  int yy = 0;
  for (int i = -1; i < 2; i++)
    for (int j = -1; j < 2; j++) {
      if (!i && !j) continue;
      if (i && j) continue;
      int xxx = x + i;
      int yyy = y + j;
      if (xxx < 0 || yyy < 0) continue;
      int cnt = 0;
      for (int k = 0; k < N; k++) {
        if (yyy > y) {
          if (A[k].second >= yyy) cnt++;
        } else if (yyy < y) {
          if (A[k].second <= yyy) cnt++;
          continue;
        } else if (xxx > x) {
          if (A[k].first >= xxx) cnt++;
          continue;
        } else if (xxx < x) {
          if (A[k].first <= xxx) cnt++;
          continue;
        }
      }
      if (cnt >= res) {
        res = cnt;
        xx = xxx;
        yy = yyy;
      }
    }
  cout << res << '\n';
  cout << xx << ' ' << yy << '\n';
  return 0;
}
