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 weza() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
bool is_num(char c) {
  if (c >= '0' && c <= '9') return true;
  return false;
}
int main() {
  weza();
  long long n, x, y, right = 0, left = 0, up = 0, down = 0, a, b;
  cin >> n >> x >> y;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (a > x) right++;
    if (a < x) left++;
    if (b > y) up++;
    if (b < y) down++;
  }
  long long mx = max({right, left, up, down});
  cout << mx << endl;
  if (mx == right)
    cout << x + 1 << " " << y << endl;
  else if (mx == left)
    cout << x - 1 << " " << y << endl;
  else if (mx == up)
    cout << x << " " << y + 1 << endl;
  else if (mx == down)
    cout << x << " " << y - 1 << endl;
}
