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-----
4 5

-----Sample Output-----
Possible

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

Difficulty: introductory

Starter code:

Solutions:
A, B = map(int, input().split())
C = A + B

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

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

if A%3 and B%3 and (A+B)%3:
  print("Impossible")
else:
  print("Possible")

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

# A, B, A+B のいずれかの枚数のクッキーをヤギたちに渡すことができる
# 3匹のヤギ が同じ枚数ずつ食べられるようにクッキーを渡すことが可能ならば 'Possible' と、そうでなければ 'Impossible' と出力

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

a=list(map(int,input().split()))
b=sum(a)
 
if (b%3 ==0 or a[0]%3 ==0 or a[1]%3==0) :
  print('Possible')
else :
  print('Impossible')

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")

# 入力
A, B = map(int,input().split())

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

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

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 - Sharing Cookies

# A,B,A+Bのいずれかが3の倍数かどうか判定する


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')


a,b=list(map(int,input().split()))
print(("Possible" if any([x % 3 == 0 for x in [a,b,a+b]]) else "Impossible"))


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')


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 = map(int, input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
  print("Possible")
else:
  print("Impossible")

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

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 = map(int, input().split())
print("Possible" if A * B * (A + B) % 3 == 0 else "Impossible")

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")


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

if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 ==0: # 3で割って余りが出なければ、3匹平等に渡せる
    print('Possible')

else:
    print('Impossible')

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

A,B=list(map(int,input().split()))
C=A+B
if ((A>=3)&(A%3==0)) | ((B>=3)&(B%3==0)) | ((C>=3)&(C%3==0)):
  print("Possible")
else:
  print("Impossible")


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

S_list = list(map(int,input().split()))

A, B = S_list[0], S_list[1]
if (A * B * (A + B)) % 3 == 0 :
    result = "Possible"
else:
    result = "Impossible"
print(result)


a,s=map(int,input().split())
print("Impossible"if a%3 and s%3 and a%3==s%3 else "Possible")

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=map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

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

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

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

#n = int(input())
a, b = list(map(int, input().split()))
#l = list(map(int,input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

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


# 067_a
A,B=map(int,input().split())
if (1<=A and A<=100)and(1<=B and B<=100):
    sum=A+B
    if A%3==0 or B%3==0 or sum%3==0:
        print('Possible')
    else:
        print('Impossible')

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')


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")

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 = map(int, input().split())

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

# A,B,A+Bのいずれかが3の倍数になるか

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')


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_mai, B_mai = map(int, input().split())
summ = A_mai + B_mai

if (A_mai % 3 == 0 or B_mai % 3 == 0 or summ % 3 == 0):
    print('Possible')
else:
    print('Impossible')

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 = list(map(int, input().split()))
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")


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 = list(map(int, input().split()))
if a % 3 == 0 or b % 3 == 0:
    print("Possible")
elif a % 3 == 1 and b % 3 == 2:
    print("Possible")
elif a % 3 == 2 and b % 3 == 1:
    print("Possible")
else:
    print("Impossible")


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=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

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

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=map(int,input().split());print(['Imp','P'][a%3==0 or b%3==0 or (a+b)%3==0]+'ossible')

a, b = map(int, input().split())
# intは入力に対しての関数、出力ではない

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

# クッキー枚数（A,B）を整数で入力
A,B = map(int,input().split())
# AかBかA+Bのどれかを3匹に分けれればPossible、できなければImpossible
if A%3==0 or B%3==0 or (A+B)%3==0:
    print("Possible")
else:
    print("Impossible")

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=list(map(int,input().split()))
if A%3==0 or B%3==0 or (A+B)%3==0:
    print("Possible")
else:
    print("Impossible")


#   AtCoder abc067 a
#   ストレッチ課題

#   入力
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")


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


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

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

bool_a = a % 3 == 0
bool_b = b % 3 == 0
bool_ab = (a + b) % 3 == 0

if bool_a or bool_b or bool_ab:
    print('Possible ')
else:
    print('Impossible ')


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

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 = list(map(int, input().split()))
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")


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")

lst = input().split()

A = int(lst[0])
B = int(lst[1])

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

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

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 = map(int, input().split())
print('Possible' if A%3==0 or B%3==0 or (A+B)%3==0 else 'Impossible')

# 入力
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 = map(int, input().split())

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

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

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 = map(int, input().split())

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

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


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=map(int, input().split())
print("Possible" if a*b*(a+b)%3==0 else "Impossible")

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 = input().split()

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

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

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

total = A + B

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

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")


def iroha():
    a,b = map(int, input().split())
    aa = a % 3
    bb = b % 3
    cc = (a+b) % 3

    print("Possible") if aa == 0 or bb == 0 or cc == 0 else print("Impossible")


def __starting_point():
    iroha()


__starting_point()

# 入力
A, B = map(int, input().split())

# A,B,A+Bのうちどれか1つでも3で割り切れればPossible
if A % 3 == 0:
    print('Possible')
elif B % 3 == 0:
    print('Possible')
elif (A + B) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

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

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 - Sharing Cookies

# 3匹のヤギにクッキーを渡したい
# A 枚入ったクッキーが入った缶
# B 枚入ったクッキーが入った缶
# A B 缶を持っている。

#  A, B, A + B のいずれかの枚数をヤギに渡すことができる

# 3匹のヤギが同じ枚数食べれるように渡せるか判定する
# 可能なら Possible    不可能なら Impossible

# A B を標準入力で取得
A, B = list(map(int, input().split()))
# print(A, B)

# A の場合 Bの場合 A + B の場合で分ける
# それぞれの余りが 0 の時 Possible
# それ以外は Impossible

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

# 結果を出力
print(answer)


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 = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
    print('Possible')
else:
    print('Impossible')

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

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

'''
ABC067 A - Sharing Cookies
https://atcoder.jp/contests/abc067/tasks/abc067_a
'''

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


# A - Sharing Cookies
# https://atcoder.jp/contests/abc067/tasks/abc067_a

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

result = 'Impossible'

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

print(result)


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

for i in [A, B, A + B]:
    if i % 3 == 0:
        print("Possible")
        return
print("Impossible")


# 枚数を取得
A,B = map(int,input().split())
Total = A + B

# いずれかのパターンで3分割均等にできるかを判定後メッセージを出力
if A % 3 == 0 \
or B % 3 == 0 \
or Total % 3 == 0:
    print("Possible")
else:
    print("Impossible")

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 = map(int, input().split())

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

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 = map(int,input().split())

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

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

#
# abc067 a
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """4 5"""
        output = """Possible"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """1 1"""
        output = """Impossible"""
        self.assertIO(input, output)


def resolve():
    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")


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

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

# 067a

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')


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

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

# すぬけくんは 3匹のヤギにクッキーを渡したいです。
# すぬけくんは A枚のクッキーが入った缶と、
# B枚のクッキーが入った缶を持っています。
# すぬけくんは A, B, A + B のいずれかの枚数のクッキーを
# ヤギたちに渡すことができます。
# 3匹のヤギが同じ枚数ずつ食べられるように
# クッキーを渡すことが可能かどうか判定してください。

# 制約
# 1 ≦ A, B ≦ 100
# A, B はいずれも整数

# 標準入力から A, B を取得する
a, b = list(map(int, input().split()))


result = "ret"

# 以下、判定処理
if a % 3 == 0:  # Aの缶だけを渡して、3等分できる
    result = "Possible"
elif b % 3 == 0:  # Bの缶だけを渡して、3等分できる
    result = "Possible"
elif (a + b) % 3 == 0:  # A + B 缶を渡して、3等分できる
    result = "Possible"
else:
    result = "Impossible"

print(result)


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 = map(int,input().split())

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

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