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 change(string &s, int a) {
  if (s[a] == 'W')
    s[a] = 'B';
  else
    s[a] = 'W';
  if (s[a + 1] == 'W')
    s[a + 1] = 'B';
  else
    s[a + 1] = 'W';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  pair<long long, long long> escu;
  cin >> escu.first >> escu.second;
  pair<long long, long long> stud[n];
  for (long long i = (0); i < (long long)(n); i++)
    cin >> stud[i].first >> stud[i].second;
  long long cont1 = 0, cont2 = 0, cont3 = 0, cont4 = 0;
  for (long long i = (0); i < (long long)(n); i++) {
    if (stud[i].second < escu.second) cont1++;
    if (stud[i].second > escu.second) cont2++;
    if (stud[i].first < escu.first) cont3++;
    if (stud[i].first > escu.first) cont4++;
  }
  long long grande = max(cont1, max(cont2, max(cont3, cont4)));
  if (grande == cont1) {
    cout << cont1 << "\n";
    cout << escu.first << " " << escu.second - 1 << "\n";
  } else if (grande == cont2) {
    cout << cont2 << "\n";
    cout << escu.first << " " << escu.second + 1 << "\n";
  } else if (grande == cont3) {
    cout << cont1 << "\n";
    cout << escu.first - 1 << " " << escu.second << "\n";
  } else if (grande == cont4) {
    cout << cont4 << "\n";
    cout << escu.first + 1 << " " << escu.second << "\n";
  }
  return 0;
}
