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 Min(int x, int y) {
  if (x > y) {
    return y;
  } else {
    return x;
  }
}
int Max(int x, int y) {
  if (x < y) {
    return y;
  } else {
    return x;
  }
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int maxV(vector<int> v) {
  sort(v.begin(), v.end());
  int a = v.at(0), sum = 0, max = 0;
  for (int i = 0; i < v.size(); i++) {
    if (v.at(i) == a) {
      sum++;
    } else {
      a = v.at(i);
      if (max < sum) {
        max = sum;
        sum = 1;
      }
    }
  }
  if (max < sum) {
    max = sum;
  }
  return max;
}
int main() {
  int n, x, y, v, w;
  cin >> n >> x >> y;
  int a = 0, b = 0, c = 0, d = 0;
  for (int i = 0; i < n; i++) {
    cin >> v;
    cin >> w;
    if (v >= x + 1) {
      a++;
    }
    if (v <= x - 1) {
      b++;
    }
    if (w >= y + 1) {
      c++;
    }
    if (w <= y - 1) {
      d++;
    }
  }
  if ((a > b) && (a > c) && (a > d)) {
    cout << a << "\n" << x + 1 << " " << y;
  } else if ((b > a) && (b > c) && (b > d)) {
    cout << b << "\n" << x - 1 << " " << y;
  } else if ((c > a) && (c > b) && (c > d)) {
    cout << c << "\n" << x << " " << y + 1;
  } else {
    cout << d << "\n" << x << " " << y - 1;
  }
  return 0;
}
