Skip to content

Instantly share code, notes, and snippets.

@IKKO-Ohta
Created June 30, 2017 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IKKO-Ohta/b8e02d387b4f5b57744ae22d1974b158 to your computer and use it in GitHub Desktop.
Save IKKO-Ohta/b8e02d387b4f5b57744ae22d1974b158 to your computer and use it in GitHub Desktop.
nums = [int(x) for x in input().split()]
N,M = nums[0],nums[1]
right = M-2*N
if right < 0:
print(-1,-1,-1)
exit(0)
c = right // 2
b = right % 2
a = N - b - c
if a >= 0:
print(a,b,c)
else:
print(-1,-1,-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment