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:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    A,B = inputMap()
    
    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 = [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())
ans = 'Impossible'
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    ans = 'Possible'
print(ans)

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 = 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())
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())
if any((a % 3 == 0, b % 3 == 0, (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:
# -*- coding: utf-8 -*-S
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%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 c%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) | (b%3 == 0) | ((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 or b % 3 == 0 or (a + b) % 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:
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:
n, m = map(int, input().split())

if (n % 3 == 0 or m % 3 == 0 or (n+m) % 3 ==0):
  print('Possible')
else:
  print('Impossible')

Submission status: Accepted

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

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

# solve
ans = 'Possible' if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0 else 'Impossible'

# output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

l = LIST()
l.append(sum(l))
for c in l:
    if c % 3 == 0:
        print("Possible")
        os.sys.exit()
print("Impossible")

Submission status: Accepted

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

tmp = A + B
if tmp % 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())
print('Possible' if (a%3)*(b%3)*((a+b)%3)==0 else 'Impossible')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LI()
    if not (a % 3 and b % 3 and (a + b) % 3):
        print("Possible")
    else:
        print("Impossible")
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#ABC67 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:
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:
# 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:
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:
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')


main()

Submission status: Accepted

Solution code:
x, y = map(int,input().split())
#ls = list(map(int,input().split()))
#r = int(input())
#s = input()
#x, y = 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 + 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 not (a+b) % 3 or not a % 3 or not b % 3:
  print('Possible')
else:
  print('Impossible')

#if not a % 3:
#  print('Impossible')
#elif not b % 3:
#  print('Impossible')
#elif not a+b % 3:
#  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 % 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+B)%3==0 or A%3==0 or B%3==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
if a[0]%3==0 or a[1]%3==0 or (a[0]+a[1])%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())

# print(A)
# print(B)

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())
s = list(map(lambda x: x%3, [a,b,a+b]))
if s.count(0) >= 1:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B = nl()

if A % 3 == 0 or B % 3 == 0 or (A+B) % 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):
    if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
        print(YES)
    else:
        print(NO)

    return


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 = [int(ele) for ele in input().split()]


def main():
    ans = "Possible"
    print(ans if solve() else "Impossible")


def solve():
    if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
        return True

    return False


if __name__ == "__main__":
    main()

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

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 A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
        ret = YES
    else:
        ret = NO
    print(ret)
    return


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, 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:
def abc():
    a, b = map(int, input().split())

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


abc()

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=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 = [int(s) for s in input().split()]
print('Possible' if list(filter(lambda n: n % 3 == 0, [A, B, A + B])) 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())
bl = False
for x in [a,b,a+b]:
  if x%3 == 0:
    bl = True

print('Possible' if bl 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:
# -*- 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:
A, B = [int(x) for x in input().split()]
if (A+B)%3 and A%3 and B%3:
    print('Impossible')
else:
    print('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())
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())
print("Impossible" if (a%3*b%3==1 or a%3*b%3==4) 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 = [ int(v) for v 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 or b % 3 == 0 or (a+b) % 3 == 0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

Solution code:
# sys.stdin.readline()
import sys
input = sys.stdin.readline

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

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())
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())
x=a+b

if a%3==0 or b%3==0 or x%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 = input().split()
a, b = int(a), int(b)
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 = [int(i) for i in 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=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, raw_input().split())
c = a + b
if c % 3 == 0 or a % 3 == 0 or b % 3 ==0:
    print "Possible"
else:
    print "Impossible"

Submission status: Accepted

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

import itertools
from collections import Counter
from collections import defaultdict
import bisect

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:
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 = [int(i) for i in input().split()]

if any(c % 3 == 0 for c in [A, B, A + B]):
    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:
import sys


def input():
    return sys.stdin.readline()[:-1]

#N = int(input())
#A = [int(x) for x in input().split()]
#a, b, c = map(int, input().split())
#name1 = str(input())
#alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


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

Submission status: Accepted

Solution code:
#ABC067A
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:
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(lambda x:int(x)%3,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%3)==0 or (b%3)==0 or ((a+b)%3)==0:
    print("Possible")
else:
    print("Impossible")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split());print(("Possible","Impossible")[min([A%3,B%3,(A+B)%3])])

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+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());print('PIomspsoisbslieb l e'[list(map(lambda x:x%3,[a,b,a+b])).count(0)==0::2])

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())
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('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())
print('Possible' if a%3 == 0 or b%3 == 0 or (a + b) % 3 == 0 else 'Impossible')

Submission status: Accepted

Solution code:

def read_input():
    a, b = map(int, input().split())

    return a, b


def submit():
    a, b = read_input()

    if a % 3 == 0:
        print('Possible')
        return

    if b % 3 == 0:
        print('Possible')
        return

    if (a + b) % 3 == 0:
        print('Possible')
        return

    print('Impossible')

if __name__ == '__main__':
    submit()

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:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

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

solve()

Submission status: Accepted

Solution code:
a,b= list(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:
a, b = map(int, input().split())

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math

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 = (int(i) for i 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())
print(["Impossible","Possible"][a*b%3==0 or (a+b)%3==0])

Submission status: Accepted

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

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())
ans = 0
if a % 3 == 0:
  ans += 1
elif b % 3 == 0:
  ans +=1
elif (a + b) % 3 == 0:
  ans += 1

if ans > 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:
    ans = 'Possible'
else:
    ans = 'Impossible'
print(ans)

Submission status: Accepted

Solution code:
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


a, b = inl()
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:
  print("Possible")
elif b%3==0:
  print("Possible")
elif (a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    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')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if (a + b) % 3 == 0:
    print('Possible')
elif a % 3 == 0:
    print('Possible')
elif 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:
# ABC067A - Sharing Cookies
a, b = list(map(int, input().rstrip().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*B%3*(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')