Problem:


Score : 100 points

Problem Statement

Snuke is giving cookies to his three goats.

He has two cookie tins. One contains A cookies, and the other contains B cookies. He can thus give A cookies, B cookies or A+B cookies to his goats (he cannot open the tins).

Your task is to determine whether Snuke can give cookies to his three goats so that each of them can have the same number of cookies.

Constraints

1 \leq A,B \leq 100

Both A and B are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

If it is possible to give cookies so that each of the three goats can have the same number of cookies, print Possible; otherwise, print Impossible.

Sample Input 1

4 5

Sample Output 1

Possible

If Snuke gives nine cookies, each of the three goats can have three cookies.

Sample Input 2

1 1

Sample Output 2

Impossible

Since there are only two cookies, the three goats cannot have the same number of cookies no matter what Snuke gives to them.



Sample input:
4 5


Sample output:
Possible

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a%3*b%3*(a+b)%3==0:print("Possible")
else:print("Impossible")

Submission status: Accepted

Solution code:
a,b=[int(i) for i in input().split()]

if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A,B= map(int, input().split())
C = A + B
if A % 3 == 0 or B % 3 == 0 or C % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B= map(int, input().split())
C = A + B
if A % 3 == 0:
  print("Possible")
elif B % 3 == 0:
  print("Possible")
elif C % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A, B = [int(x) for x in input().split()]

if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 == 0:
    print("Possible")
elif b%3 == 0:
    print("Possible")
elif (a+b)%3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]
if a%3==0 or b%3==0 or (a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 and b%3 and (a+b)%3:
  print('Impossible')
else:
  print('Possible')

Submission status: Accepted

Solution code:
a, b = map(int, input().strip().split())
if any([s % 3 == 0 for s in [a, b, a + b]]):
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
# coding: utf-8
A, B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc067/tasks/abc067_a

A, B = map(int, input().split())

if (A % 3 == 0) or (B % 3 == 0) or ((A + B) % 3 == 0):
    print('Possible')

else:
    print('Impossible')

Submission status: Accepted

Solution code:
import itertools
def main():
  a,b = map(int,input().split())
  ans = False
  if a % 3 == 0:
    ans = True
  elif b % 3 == 0:
    ans = True
  elif (a + b) % 3 == 0:
    ans = True
  print("Possible" if ans else "Impossible")
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 ==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print('Possible' if a%3==0 or b%3==0 or (a+b)%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if (a%3 == 0) or (b%3 == 0) or ((a+b)%3 ==0):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())

if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 ==0:
	print("Possible")
else:
	print("Impossible")

Submission status: Accepted

Solution code:

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

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print("Impossible" if a*b*(a+b)%3 else "Possible")

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    flag = False
    if not a % 3: flag = True
    elif not b % 3: flag = True
    elif not (a + b) % 3: flag = True
    ans = 'Possible' if flag else 'Impossible'
    print(ans)

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
#  ABC 067: A – Sharing Cookies
a, b = [int(s) for s in input().split()]
print('Possible' if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0 else 'Impossible')

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))

if A%3==0 or B%3==0 or (A+B)%3==0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print("Possible" if a*b*(a+b)%3==0 else "Impossible")

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    b, c = map(int, input().split())

    if b % 3 ==0 or c % 3 == 0 or (b+c) %3 ==0:
        print("Possible")
    else:
        print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 ==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print("Possible" if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0 else "Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B= map(int,input().split())
print('Possible' if A%3==0 or B%3==0 or (A+B)%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split());print(['P','Imp'][A%3*(B%3)*(A+B)%3>0]+'ossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:print('Possible')
else:print('Impossible')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print("Possible" if (a%3==0 or b%3==0 or (a+b)%3==0) else "Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
for i in [A, B, A+B]:
    if i % 3 == 0:
        print("Possible")
        break
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if A * B * (A+B) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a % 3 == 0) or (b % 3 == 0) or ((a + b) % 3 == 0):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print("Possible" if (A + B) % 3 == 0 or A % 3 == 0 or B % 3 == 0 else "Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print("Possible" if (a+b)%3==0 or a%3==0 or b%3==0 else("Impossible"))

Submission status: Accepted

Solution code:
A,B= map(int,input().split())

if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
if A % 3 == 0 or B % 3 == 0 or ( A + B ) % 3 ==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
import math

A,B=list(map(int, input().split()))

if A%3==0 or B%3==0 or (A+B)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]

if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    print('Possible')
else :
    print('Impossible')

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
if A * B * (A + B) % 3 == 0: print("Possible")
else: print("Impossible")

Submission status: Accepted

Solution code:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.buffer.readline().split()))
    print('Possible' if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0 else 'Impossible')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split(' ')]
if l[0]%3 == 0 or l[1]%3==0 or (l[0]+l[1])%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


YES = "Possible"  # type: str
NO = "Impossible"  # type: str


def solve(A: int, B: int):
    print(YES if A * B * (A + B) % 3 == 0 else NO)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=(map(int,input().split()))
if a%3==0 or b%3==0 or (a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())
if (A + B) % 3 == 0:
    print "Possible"
elif A % 3 == 0 or B % 3 == 0:
    print "Possible"
else:
    print "Impossible"

Submission status: Accepted

Solution code:
a,b =map(int,input().split())
print('Possible' if a*b*(a+b)%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A*B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
#abc067 a 
a,b=map(int,input().split())
flag=False
x=[a,b,a+b]
for i in x:
    if i%3==0:
        flag=True
if flag:
 	print("Possible")
else:
 	print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a%3==0 or b%3==0 or (a+b)%3==0:
  print("Possible")

else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))

if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
    print("Possible")

else:
    print("Impossible")

Submission status: Accepted

Solution code:
x,y=list(map(int, input().split()))
if x%3==0 or y%3==0 or (x+y)%3==0:
	print('Possible')
else:
	print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a%3==0) or (b%3==0) or ((a+b)%3==0):
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
# A - Sharing Cookies
a,b=list(map(int,input().split()))
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if (A+B)%3==0 or A%3==0 or B%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
#%%
a, b = map(int, input().split())

#%%
if a % 3 == 0  or b % 3 == 0 or (a + b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B= input().split()
A = int(A)
B = int (B)
if A%3 ==0 or B%3 ==0 or (A+B)%3 ==0:
    print ("Possible")
else:
    print ("Impossible")

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]
print('Possible' if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0 else 'Impossible')

Submission status: Accepted

Solution code:
A,B =map(int,input().split())
if A%3 == 0 or B%3 ==0 or (A+B)%3 ==0:
  print("Possible")
  
else:
  print("Impossible")
  
  
#A,B,Cが少なくとも一つ三の倍数かどうかを確かめる
#A*B*C%3==0　でいける！！！

Submission status: Accepted

Solution code:
A,B =map(int,input().split())
if A%3 == 0 or B%3 ==0 or (A+B)%3 ==0:
  print("Possible")
  
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int, input().split())

print("Possible" if (a%3==0 or b%3==0 or (a+b)%3==0) else "Impossible")

Submission status: Accepted

Solution code:
# import bisect
# from collections import Counter, defaultdict, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    a, b = list(map(int,ipti().split()))

    if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
        print("Possible")
    else:
        print("Impossible")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=map(int,raw_input().split())
if (a+b)%3==0 or a%3==0 or b%3==0:
  print "Possible"
else:
  print "Impossible"

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
	print("Possible")
else:
  	print("Impossible")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a, b = map(int,input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print("Possible" if A%3==0 or B%3==0 or (A+B)%3==0 else "Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
def main():
    import sys
    #input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations
    #from itertools import accumulate, product
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    #from operator import itemgetter

    #mod = 1000000007

    a,b =map(int, input().split())
    if a%3==0:
        print('Possible')
        exit()
    if b%3==0:
        print('Possible')
        exit()
    if (a+b)%3==0:
        print('Possible')
        exit()
    print('Impossible')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print('Possible' if a%3==0 or b%3==0 or (a+b )%3==0 else 'Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if (a + b) % 3 == 0 or a % 3 == 0 or b % 3 ==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy3
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    A,B=MI()
    if A%3==0 or B%3==0 or(A+B)%3==0:
        print("Possible")
    else:
        print("Impossible")
        

main()

Submission status: Accepted

Solution code:
#067_A
a,b=map(int,input().split())
print('Impossible' if a%3!=0 and b%3!=0 and (a+b)%3!=0 else 'Possible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print("Possible" if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0 else "Impossible")

Submission status: Accepted

Solution code:
a, b,= map(int, input().split())

if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

def f(a):
  if a % 3 == 0:
    return True
  else:
    return False
  
if f(a) or f(b) or f(a + b):
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
import numpy as np


a, b = map(int ,input().split())
l = np.array([a, b, a+b])
l %= 3
if all(l):
    print("Impossible")
else:
    print("Possible")

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
        print("Possible")
    else:
        print("Impossible")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if (a+b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

A,B = [int(i) for i in input().rstrip().split()]

if (A%3) == 0:
  print("Possible")
elif  (B%3) == 0:
  print("Possible")
elif  ((A+B)%3) == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print('Possible') if a+b>=3 and (a%3==0 or b%3==0 or (a+b)%3==0) else print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a%3 == 0 or b%3 == 0 or (a + b)%3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A, B = [int(_) for _ in input().split()]
if A%3 == 0 or B%3 == 0 or (A + B)%3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print("Possible" if a%3==0 or b%3==0 or (a+b)%3==0 else "Impossible" )

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a%3==0 or b%3==0 or (a+b)%3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a % 3 ==0 or b % 3 ==0 or (a+b) % 3 ==0:
  print("Possible")
  
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = "Possible"

if a % 3 == 0:
    pass
elif b % 3 == 0:
    pass
elif (a + b) % 3 == 0:
    pass
else:
    ans = "Impossible"

print(ans)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A % 3 == 0:
    s = 'Possible'
elif B % 3 == 0:
    s = 'Possible'
elif (A + B) % 3 == 0:
    s = 'Possible'
else:
    s = 'Impossible'
print(s)

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    print("Possible" if a * b * (a + b) % 3 == 0 else "Impossible")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if(a%3==0 or b%3==0 or (a+b)%3==0):
	print("Possible")
else:
	print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
num=list(map(int,input().split()))
print("Possible" if sum(num)%3==0 or num[0]%3==0 or num[1]%3==0 else "Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print("Impossible" if a*b*(a+b)%3 else "Possible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

ans = 'Impossible'

if A % 3 == 0:
    ans = 'Possible'
elif B % 3 == 0:
    ans = 'Possible'
elif (A + B) % 3 == 0:
    ans = 'Possible'

print(ans)

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
if a % 3 == 0 or b % 3 == 0 or (a + b ) % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or(a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if a*b*(a+b) % 3 ==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if (a + b) % 3 == 0  or a % 3 == 0 or b % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a%3==0 or b%3==0 or (a+b)%3==0:
	print("Possible")
else:
	print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())


if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a, b= map(int, input().split())
x = False
for i in [a, b, a+b]:
  if i%3 == 0:
    x = True
print("Possible" if x else "Impossible")

Submission status: Accepted

Solution code:
a, b= map(int, input().split())
if a%3 == 0:
  print("Possible")
elif b%3 == 0:
  print("Possible")
elif (a+b)%3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a,b=list(map(int,input().split()))
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0:
    print('Possible')
elif (A+B) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin

mod = 1000000007
inf = 1 << 60
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda x: [ns() for _ in range(x)]
nas = lambda: stdin.readline().split()

ab = na()
ab.append(ab[0] + ab[1])

flag = False
for i in range(3):
    if ab[i] % 3 == 0:
        flag = True

if flag:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b)%3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(["Impossible", "Possible"][a*b*(a+b)%3==0])

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%3==0:
	print("Possible")
else:
	print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int,input().split())

print("Possible" if (A + B) % 3 == 0 or A % 3 == 0 or B % 3 == 0 else "Impossible")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Possible"  # type: str
NO = "Impossible"  # type: str


def solve(A: int, B: int):
    if 3 <= A and A%3==0:
        return YES
    elif 3 <= B and B%3==0:
        return YES
    elif 3 <= A+B and (A+B)%3==0:
        return YES
    return NO


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    print(solve(A, B))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(['P','Imp'][all([a%3>0,b%3>0,(a+b)%3>0])]+'ossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a%3==0 or b%3==0 or (a+b)%3==0: print('Possible')
else: print('Impossible')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if  (a%3==0) or ((a+b)%3 == 0) or (b%3==0) :
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print('Possible') if A%3==0 or B%3==0 or(A+B)%3==0 else print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
def yagi(a , b):
    ans = ""

    if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
        ans = "Possible"
    else:
        ans = "Impossible"

    return ans

def main():
    a , b= map(int , input().split())
    print(yagi(a , b))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(["Impossible", "Possible"][a*b%3==0 or (a+b)%3==0])

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split())

if ((A%3==0)or(B%3==0)or((A+B)%3==0)):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
 
if (a + b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
  print("Possible")
else:
  print('Impossible')

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
a=A+B
l = [A,B,a]
for i in range(3):
    if l[i]%3==0:
        print("Possible")
        exit()

print("Impossible")

Submission status: Accepted

Solution code:
a,b=[int(s) for s in input().split()]
if a*b*(a+b)%3==0:
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

Solution code:
# 入力 : 数字2つ
a, b = map(int, input().split())

# 出力　a, b, a+b のどれかが3の倍数か

if a%3 and b%3 and (a+b)%3 :
    print("Impossible")
else :
    print("Possible")

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
if (a + b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
    print('Possible ')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
A,B=map(int,input().split())

if((A+B)%3==0 or A%3==0 or B%3==0):
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
if X%3==0 or Y%3==0 or (X+Y)%3==0:
  print("Possible") 
else:
  print("Impossible")

Submission status: Accepted

Solution code:
a, b= map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0: print("Possible")
else: print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
f=a%3==0 or b%3==0 or (a+b)%3==0
print("Possible" if f==True else "Impossible")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B = map(int, input().split())
    print('Possible' if any([A % 3 == 0,
                             B % 3 == 0,
                             (A + B) % 3 == 0]) else 'Impossible')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a_list = list(map(int, input().split()))

ans = "Impossible"

if sum(a_list) % 3 == 0 \
	or a_list[0] % 3 == 0 \
  	or a_list[1] % 3 == 0:
      ans = "Possible"
      
print(ans)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if A%3 == 0 or B%3 == 0 or (A+B)%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0 :
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B = map(int, readline().split())

print('Possible' if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0 else 'Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print('Possible')
#elif b%3==0:
#elif (a+b)%3==0:
else:
    print('Impossible')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a,b = map(int,input().split())
if (a % 3)*(b % 3) % 3 != 1:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a,b = map(int,input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b)%3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
arr = input().split()
arr = list(map(int,arr))
a = arr[0]
b = arr[1]

if a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

print("Possible" if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0 else "Impossible")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
	print("Possible")
else:
	print("Impossible")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A % 3 == 0:
    print('Possible')
elif B % 3 == 0:
    print('Possible')
elif (A + B) % 3 == 0:
    print('Possible')
else:
    print('Impossible')