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;
using lint = long long;
const int inf = 1000000007;
const int MOD = 1000000007;
int dist(pair<int, int> s, pair<int, int> t) {
  return abs(s.first - t.first) + abs(s.second - t.second);
}
signed main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  vector<pair<int, int>> p(n);
  for (int i = 0; i < n; ++i) cin >> p[i].first >> p[i].second;
  int res = 0;
  pair<int, int> ans;
  vector<int> dx = {1, 0, -1, 0};
  vector<int> dy = {0, 1, 0, -1};
  for (int xxx = 0; xxx < 4; ++xxx) {
    int buf = 0;
    pair<int, int> tmp = {sx + dx[xxx], sy + dy[xxx]};
    for (int i = 0; i < n; ++i) {
      if (dist(tmp, p[i]) + 1 == dist({sx, sy}, p[i])) ++buf;
    }
    if (buf > res) {
      res = buf;
      ans = tmp;
    }
  }
  cout << res << "\n";
  cout << ans.first << " " << ans.second << "\n";
  return 0;
}
