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 main() {
  long long n, sx, sy, i, x, y, ul = 0, ur = 0, dl = 0, dr = 0, l = 0, r = 0,
                                u = 0, d = 0, c1 = 0, c2 = 0;
  cin >> n >> sx >> sy;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (x >= sx && y >= sy) {
      ur++;
      c1++;
    } else if (x >= sx && y < sy) {
      dr++;
      c1++;
    } else if (x <= sx && y >= sy) {
      ul++;
      c1++;
    } else if (x <= sx && y < sy) {
      dl++;
      c1++;
    }
    if (x < sx && y == sy) {
      l++;
      c2++;
    } else if (x > sx && y == sy) {
      r++;
      c2++;
    } else if (y > sy && x == sx) {
      u++;
      c2++;
    } else if (y < sy && x == sx) {
      d++;
      c2++;
    }
  }
  if (c1 == c2) {
    x = max(l, max(r, max(u, d)));
    if (x == l) {
      cout << x << "\n";
      cout << sx - 1 << " " << y;
    } else if (x == r) {
      cout << x << "\n";
      cout << sx + 1 << " " << y;
    } else if (x == u) {
      cout << x << "\n";
      cout << sx << " " << y + 1;
    } else if (x == d) {
      cout << x << "\n";
      cout << sx << " " << y - 1;
    }
  } else {
    x = max(ur, max(dr, max(ul, dl)));
    if (x == ur) {
      if (ul >= dr) {
        x += ul;
        cout << x << "\n";
        cout << sx << " " << sy + 1;
      } else {
        x += dr;
        cout << x << "\n";
        cout << sx + 1 << " " << sy;
      }
    } else if (x == dr) {
      if (dl >= ur) {
        x += dl;
        cout << x << "\n";
        cout << sx << " " << sy - 1;
      } else {
        x += ur;
        cout << x << "\n";
        cout << sx + 1 << " " << sy;
      }
    } else if (x == ul) {
      if (ur >= dl) {
        x += ur;
        cout << x << "\n";
        cout << sx << " " << sy + 1;
      } else {
        x += dl;
        cout << x << "\n";
        cout << sx - 1 << " " << sy;
      }
    } else if (x == dl) {
      if (ul >= dr) {
        x += ul;
        cout << x << "\n";
        cout << sx - 1 << " " << sy;
      } else {
        x += dr;
        cout << x << "\n";
        cout << sx << " " << sy - 1;
      }
    }
  }
  return 0;
}
