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;
long long M = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long q = 1;
  while (q--) {
    long long n, s1, s2, x, y;
    cin >> n >> s1 >> s2;
    long long a = 0, b = 0, c = 0, d = 0;
    for (long long i = 0; i < n; i++) {
      cin >> x >> y;
      if (s1 > x) a++;
      if (s1 < x) b++;
      if (s2 > y) c++;
      if (s2 < y) d++;
    }
    long long m;
    m = max(max(a, b), max(c, d));
    cout << m << endl;
    if (m == a)
      cout << s1 - 1 << " " << s2;
    else if (m == b)
      cout << s1 + 1 << " " << s2;
    else if (m == c)
      cout << s1 << " " << s2 - 1;
    else
      cout << s1 << " " << s2 + 1;
  }
}
