import math
from functools import reduce

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

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

def main():
    flag = True
    LCM = A[-1]
    for i in range(N - 2, -1, -1):
        if gcd(A[i], LCM) != 1:
            flag = False
            break

        LCM *= A[i]

    if flag:
        print("pairwise coprime")
    else:
        if gcd_list(A) == 1:
            print("setwise coprime")
        else:
            print("not coprime")

if __name__ == "__main__":
    main()