4299번 풀이 [Python]

sua·2022년 5월 23일
0

Baekjoon

목록 보기
33/161
post-thumbnail

문제


풀이

a, b = map(int, input().split())

if a < b:
    print(-1)
else:
    c = (a + b) // 2
    d = (a - b) // 2
    if (c + d) == a and (c - d) == b : 
        print(c, d)
    else:
        print(-1)
profile
가보자고

0개의 댓글