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;
signed main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x < sx && y < sy) {
      cnt1++;
      cnt2++;
    }
    if (x < sx && y > sy) {
      cnt1++;
      cnt4++;
    }
    if (x > sx && y < sy) {
      cnt2++;
      cnt3++;
    }
    if (x > sx && y > sy) {
      cnt3++;
      cnt4++;
    }
    if (x > sx && y == sy) {
      cnt3++;
    }
    if (x < sx && y == sy) {
      cnt1++;
    }
    if (y < sy && sx == x) {
      cnt2++;
    }
    if (y > sy && sx == x) {
      cnt4++;
    }
  }
  int h = max(max(cnt1, cnt2), max(cnt3, cnt4));
  cout << h << "\n";
  if (h == cnt1) {
    cout << sx - 1 << " " << sy;
  } else if (h == cnt2) {
    cout << sx << " " << sy - 1;
  } else if (h == cnt3) {
    cout << sx + 1 << " " << sy;
  } else {
    cout << sx << " " << sy + 1;
  }
  return 0;
}
