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;
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.emplace_back(x);
  return move(v);
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << '\n';
  err(++it, args...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int x, y, n;
  cin >> n >> x >> y;
  vector<pair<long long int, long long int>> p;
  long long int q1 = 0, q2 = 0, q3 = 0, q4 = 0;
  for (int i = 0; i < n; i++) {
    long long int a, b;
    cin >> a >> b;
    a -= x;
    b -= y;
    p.push_back({a, b});
    q1 += ((a >= 0) && (b > 0));
    q2 += ((a >= 0) && (b <= 0));
    q3 += ((a < 0) && (b <= 0));
    q4 += ((a < 0) && (b > 0));
  }
  vector<long long int> m = {q1 + q2, q2 + q3, q3 + q4, q4 + q1};
  long long int ans = 0;
  for (auto it : m) ans = max(ans, it);
  long long int c = 0;
  while (c < 4) {
    if (ans == m[c]) break;
    c++;
  }
  cout << ans << endl;
  if (c == 0)
    cout << x + 1 << " " << y << endl;
  else if (c == 1)
    cout << x << " " << y - 1 << endl;
  else if (c == 2)
    cout << x - 1 << " " << y << endl;
  else
    cout << x << " " << y + 1 << endl;
  return 0;
}
