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;
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;
}
