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;
const int inf = 2e9;
const int mod = 1e9 + 7;
const int N = 2e5 + 15;
int n, first[10], s[10], a[N][2], pos[2], ans[2];
int cnt;
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n >> pos[0] >> pos[1];
  for (int i = 1; i <= n; ++i)
    for (int j = 0; j < 2; ++j) cin >> a[i][j];
  for (int i = 1; i <= n; ++i) {
    first[0] += a[i][1] < pos[1];
    first[1] += a[i][1] > pos[1];
    first[2] += a[i][0] < pos[0];
    first[3] += a[i][0] > pos[0];
  }
  int ind = max_element(first, first + 10) - first;
  cout << first[ind] << '\n';
  if (ind == 0)
    cout << pos[0] << ' ' << pos[1] - 1 << '\n';
  else if (ind == 1)
    cout << pos[0] << ' ' << pos[1] + 1 << '\n';
  else if (ind == 3)
    cout << pos[0] - 1 << ' ' << pos[1] << '\n';
  else
    cout << pos[0] + 1 << ' ' << pos[1] << '\n';
  return 0;
}
