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;
void solve() {
  long long n, x, y;
  cin >> n >> x >> y;
  long long z = n, cnt = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
  while (z--) {
    long long a, b;
    cin >> a >> b;
    if (a < x) {
      cnt++;
    }
    if (a > x) {
      cnt2++;
    }
    if (b < y) {
      cnt3++;
    }
    if (b > y) {
      cnt4++;
    }
  }
  cout << max(cnt, max(cnt2, max(cnt3, cnt4))) << '\n';
  if (max(cnt, max(cnt2, max(cnt3, cnt4))) == cnt) {
    cout << x - 1 << " " << y << '\n';
    return;
  }
  if (max(cnt, max(cnt2, max(cnt3, cnt4))) == cnt2) {
    cout << x + 1 << " " << y << '\n';
    return;
  }
  if (max(cnt, max(cnt2, max(cnt3, cnt4))) == cnt3) {
    cout << x << " " << y - 1 << '\n';
    return;
  }
  if (max(cnt, max(cnt2, max(cnt3, cnt4))) == cnt4) {
    cout << x << " " << y + 1 << '\n';
    return;
  }
}
int main() {
  long long t = 1;
  while (t--) {
    solve();
  }
}
