import itertools
from functools import reduce
import math

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

N = int(input())
A = [int(x) for x in input().split(" ")]


pair = list(itertools.combinations(A, 2))

for i in range(len(pair)):
    print(pair[i])
    if(math.gcd(pair[i][0], pair[i][1]) != 1):
        if(gcd_list(A) == 1):
            print("setwise coprime")
            break
        else:
            print("not coprime")
            break
    else:
        print("pairwise coprime")
        break


