← Back to List

4299번: AFC μœ”λΈ”λ˜ ↗

Solutions

Python 3
126 B | 126 chars
S,K = list(map(int,input().split()))

if (S+K)%2 ==0 and (S-K)%2==0 and S>=K:
    print((S+K)//2,(S-K)//2)
else:
    print(-1)