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;
int max(int a, int b, int c, int d) { return max(a, max(b, max(c, d))); }
int main() {
  int n, x, y;
  int ans1 = 0, ans2 = 0, ans3 = 0, ans4 = 0;
  cin >> n >> x >> y;
  int x1[n + 1], y1[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> x1[i] >> y1[i];
    int p = x1[i] - x;
    int q = y1[i] - y;
    y1[i] -= y;
    if (p >= 0 && q >= 0) ans1++;
    if (p >= 0 && q <= 0) ans2++;
    if (p <= 0 && q >= 0) ans3++;
    if (p <= 0 && q <= 0) ans4++;
  }
  cout << max(ans1, ans2, ans3, ans4) << endl;
  if (ans1 >= 0 && ans2 >= 0)
    cout << x + 1 << " " << y;
  else if (ans1 <= 0 && ans2 <= 0)
    cout << x - 1 << " " << y;
  else if (ans3 >= 0 && ans4 >= 0)
    cout << x << " " << y + 1;
  else if (ans1 <= 0 && ans2 <= 0)
    cout << x << " " << y - 1;
}
