import sys

n = int(input())
numbers = list(map(lambda x: int(x), input().split()))
if_set_has_gcd = False
if_pair_has_gcd = False

max_divider = int(max(numbers) ** 0.5) + 1

for divider in range(2, max_divider + 1):
    num_divided = sum([each % divider == 0 for each in numbers])
    if num_divided == n:
        if_set_has_gcd = True
    if num_divided >= 2:
        if_pair_has_gcd = True

# print(if_set_has_gcd, if_pair_has_gcd)    
if not if_pair_has_gcd:
    print('pairwise coprime')
    sys.exit()
    
if not if_set_has_gcd:
    print('setwise coprime')
    sys.exit()
    
print('not coprime')
    
    
