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;
map<pair<int, int>, int> m;
void solve() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int cn1 = 0, cn2 = 0, cn3 = 0, cn4 = 0;
  while (n--) {
    int x, y;
    cin >> x >> y;
    if (sx + 1 <= x) cn1++;
    if (sy + 1 <= y) {
      cn2++;
    }
    if (sx - 1 >= 0 && sx - 1 >= x) {
      cn3++;
    }
    if (sy - 1 >= 0 && sy - 1 >= y) cn4++;
  }
  int p = max(cn1, max(cn2, max(cn3, cn4)));
  cout << p << '\n';
  if (cn1 == p) {
    cout << sx + 1 << ' ' << sy << '\n';
  } else if (cn2 == p)
    cout << sx << ' ' << sy + 1 << '\n';
  else if (cn3 == p)
    cout << sx - 1 << ' ' << sy << '\n';
  else
    cout << sx << ' ' << sy - 1 << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int TestCase;
  TestCase = 1;
  while (TestCase--) solve();
  return 0;
}
