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
/*As you dislike it <3*/

#include <bits/stdc++.h>
#define    _fastIO                      ios_base::sync_with_stdio(0);cin.tie(0);
#define    ll                           long long int
#define    mem(a,b)                     memset((a),(b),sizeof(a))
#define    pb                           push_back
#define    all(v)                       v.begin(),v.end()
#define    rvs(a,n)                     reverse(a, a + n)
#define    PI                           acos(-1)
#define    mx                           10000007
#define    PII                          pair<ll, ll>
#define    gc                           getchar()
#define    nl                           '\n'
#define    ff                           first
#define    ss                           second
#define    cntone(n)                    __builtin_popcount(n)//set count one
#define    Bit_off(val,pos)             (val & (~(1<<pos)))
#define    Bit_on(val,pos)              (val | (1<<pos))
#define    Bit_toggle(val,pos)          (val ^ (1<<pos))
#define    Bit_check(val,pos)           (bool)(val & (1<<pos))
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 1e9;

#define Gene template< class
#define Rics printer& operator,
Gene c> struct rge{c b, e;};
Gene c> rge<c> range(c i, c j){ return {i, j};}
struct printer{
    ~printer(){cerr<<endl;}
    Gene c >Rics(c x){ cerr<<boolalpha<<x; return *this;}
    Rics(string x){cerr<<x;return *this;}
    Gene c, class d >Rics(pair<c, d> x){ return *this,"(",x.first,", ",x.second,")";}
    Gene ... d, Gene ...> class c >Rics(c<d...> x){ return *this, range(begin(x), end(x));}
    Gene c >Rics(rge<c> x){
        *this,"["; for(auto it = x.b; it != x.e; ++it)
            *this,(it==x.b?"":", "),*it; return *this,"]";}
};
#define debug() cerr<<"LINE "<<__LINE__<<" >> ", printer()
#define dbg(x) "[",#x,": ",(x),"] "
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int my_rand(int l, int r) {
    return uniform_int_distribution<int>(l, r) (rng);
}

ll dx[]={0, 1, 0, -1};
ll dy[]={1, 0, -1, 0};
ll fx[]={0, 1, 0, -1, 1, 1, -1, -1};
ll fy[]={1, 0, -1, 0, 1, -1, 1, -1};

ll pow_mod(ll base, ll power)
{
    ll res = 1;
    while(power)
    {
        if(power & 1)
            (res *= base) %= mod;
        power >>= 1;
        ((base *= base) %= mod);
    }
    return(res % mod);

}

ll gcd(ll a, ll b) {if (b > a) {return gcd(b, a);} if (b == 0) {return a;} return gcd(b, a % b);}
ll lcm(ll a,ll b){return((a * b) / gcd(a, b));}

//vector<ll> sieve(int n) {int*arr = new int[n + 1](); vector<ll> vect; for (int i = 2; i <= n; i++)if (arr[i] == 0) {vect.push_back(i); for (int j = 2 * i; j <= n; j += i)arr[j] = 1;} return vect;}

int main()
{
    _fastIO;
    ll tc = 1;
    ll cs = 0;
    //cin >> tc;

    while(tc--){
         //printf("Case %d: ", ++cs);
         ll n, x, y;
         cin >> n >> x >> y;
         ll arr[n + 5], brr[n + 5];
         ll dist[n + 5] = {0};
         for(ll i = 1; i <= n; i++){
            cin >> arr[i] >> brr[i];
            ll temp = abs(x - arr[i]) + abs(y - brr[i]);
            dist[i] = temp;
         }


         ll ans = 0;
         ll ansx = 0, ansy = 0;
         vector<pair<ll,ll> > vp;
         for(ll i = 0; i < 4; i++){
            ll ax = x + dx[i];
            ll by = y + dy[i];
            ll cnt = 0;
            ll px = 0, py = 0;
            if(ax >= 0 and by  <= N){
                for(ll i = 1; i <= n; i++){
                   ll temp = abs(ax - arr[i]) + abs(by - brr[i]);
                   if(dist[i] - 1 == temp){
                      cnt++;
                      vp.pb(make_pair(ax, by));
                   }
                }

               if(cnt > ans){
                  ans = cnt;
               }
            }

         }

         cout << ans << nl;
         cout << vp[0].first << " " << vp[0].second << nl;

    }


    return 0;
}
//


