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
n,sx,sy=map(int,input().split())
left,right,up,down=0,0,0,0
if sx>0 and sy>0:
    for i in range(n):
        xi,yi=map(int,input().split())
        if xi<sx and yi<sy:
            left+=1
            down+=1
        elif xi<sx and yi>sy:
            left+=1
            up+=1
        elif xi>sx and yi>sy:
            right+=1
            up+=1
        elif xi>sx and yi<sy:
            right+=1
            down+=1
        elif xi<sx and yi==sy:
            left+=1
        elif xi>sx and yi==sy:
            right+=1
        elif xi==sx and yi>sy:
            up+=1
        elif xi==sx and yi<sy:
            down+=1

    ans=max(left,right,up,down)
    print(ans)
    if ans==left:
        print(sx-1,sy)
    elif ans==right:
        print(sx+1,sy)
    elif ans==up:
        print(sx,sy+1)
    elif ans==down:
        print(sx,sy-1)

elif sx==0 and sy>0:
    for i in range(n):
        xi,yi=map(int,input().split())
        if xi>sx and yi>sy:
            right+=1
            up+=1
        elif xi>sx and yi<sy:
            right+=1
            down+=1
        elif xi>sx and yi==sy:
            right+=1
        elif xi==sx and yi>sy:
            up+=1
        elif xi==sx and yi<sy:
            down+=1

    ans=max(right,up,down)
    print(ans)
    if ans==right:
        print(sx+1,sy)
    elif ans==up:
        print(sx,sy+1)
    elif ans==down:
        print(sx,sy-1)
        
elif sx>0 and sy==0:
    for i in range(n):
        xi,yi=map(int,input().split())
        if xi>sx and yi>sy:
            right+=1
            up+=1
        elif xi<sx and yi>sy:
            left+=1
            up+=1
        elif xi<sx and yi==sy:
            left+=1
        elif xi>sx and y==sy:
            right+=1
        elif xi==sx and yi>sy:
            up+=1

    ans=max(left,right,up)
    print(ans)
    if ans==right:
        print(sx+1,sy)
    elif ans==up:
        print(sx,sy+1)
    elif ans==left:
        print(sx-1,sy)

elif sx==0 and sy==0:
    for i in range(n):
        xi,yi=map(int,input().split())
        if xi>sx and yi>sy:
            right+=1
            up+=1
        elif xi==sx and yi>sy:
            up+=1
        elif xi>sx and y==sy:
            right+=1
            
    ans=max(right,up)
    print(ans)
    if ans==right:
        print(sx+1,sy)
    elif ans==up:
        print(sx,sy+1)   
    