https://www.acmicpc.net/problem/4299
a,b=map(int,input().split()) if (a+b)%2==1 or a<b: print(-1) else: n=(a+b)/2 m=a-n print("%d %d" % (n,m))