S,K = map(int,input().split()) print(S//2,K//2)