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;
int mn(long long a, long long b) {
  if (a <= b) {
    return b;
  }
  return a;
}
int main() {
  long long n, xs, ys, x, y;
  cin >> n >> xs >> ys;
  long long gore = 0, dole = 0, levo = 0, desno = 0;
  for (long long i = 0; i < n; i++) {
    cin >> x >> y;
    if (x >= xs + 1) {
      desno++;
    }
    if (y >= ys + 1) {
      gore++;
    }
    if (x <= xs - 1) {
      levo++;
    }
    if (y <= ys - 1) {
      dole++;
    }
  }
  long long pom = mn(mn(dole, gore), mn(levo, desno));
  if (pom == desno) {
    cout << desno << endl;
    cout << xs + 1 << " " << ys;
  } else if (pom == levo) {
    cout << levo << endl;
    cout << xs - 1 << " " << ys;
  } else if (pom == gore) {
    cout << gore << endl;
    cout << xs << " " << ys + 1;
  } else {
    cout << dole;
    cout << xs << " " << ys - 1;
  }
}
