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() {
  int n, a, b, t, x, y, n1, n2, n3, n4;
  cin >> n >> a >> b;
  n1 = 0;
  n2 = 0;
  n3 = 0;
  n4 = 0;
  while (n--) {
    cin >> x >> y;
    if (y < b) n1++;
    if (x > a) n2++;
    if (y > b) n3++;
    if (x < a) n4++;
  }
  t = max(n1, n2);
  t = max(t, n3);
  t = max(t, n4);
  cout << t << endl;
  if (t == n1)
    cout << a << ' ' << b - 1;
  else if (t == n2)
    cout << a + 1 << ' ' << b;
  else if (t == n3)
    cout << a << ' ' << b + 1;
  else
    cout << a - 1 << ' ' << b;
}
