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
import sys

def main():
    input = sys.stdin.read()
    data = list(map(int, input.split()))
    n, x, y = data[0:3]
    idx = [0]*5
    # print(x,y)
    for i in range(3,len(data),2):
        # print(data[i], data[i+1])
        if data[i] > x:
            idx[1] += 1
        elif data[i] < x:
            idx[2] += 1
        if data[i+1] > y:
            idx[3] += 1
        elif data[i+1] < y:
            idx[4] += 1
    nt = 0
    ans = 0
    for i in range(1,5):
        if idx[i] > ans:
            ans = idx[i]
            nt = i
    # print(nt)
    # print(idx)
    print(ans)
    if nt == 1:
        print(str(x+1) + " " + str(y))
    elif nt == 2:
        print(str(x-1) + " " + str(y))
    elif nt == 3:
        print(str(x) + " " + str(y+1))
    else:
        print(str(x) + " " + str(y-1))

if __name__ == '__main__':
    main()

	 			  	  		  	   	 	 	 			