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 main() {
  long long int n, s1, s2, x, y, a = 0, b = 0, c = 0, d = 0;
  cin >> n >> s1 >> s2;
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y;
    if (y > s2) a++;
    if (y < s2) d++;
    if (x < s1) b++;
    if (x > s1) c++;
  }
  if (a >= b && a >= c && a >= d) {
    cout << a << endl;
    cout << s1 << " " << s2 + 1;
  } else if (b >= a && b >= c && b >= d) {
    cout << b << endl;
    cout << s1 - 1 << " " << s2;
  } else if (c >= b && c >= a && c >= d) {
    cout << c << endl;
    cout << s1 + 1 << " " << s2;
  } else if (d >= b && d >= c && d >= a) {
    cout << d << endl;
    cout << s1 << " " << s2 - 1;
  }
}
