def resolve():
    n=int(input())
    a = list(map(int, input().split()))
    seki=1
    import math
    from functools import reduce

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

    for i in a:
      seki*=i

    c=seki
    ch=0

    for i in range(n-1):
        seki=int(seki/a[i])
        gc=gcd(a[i], seki)
        if gc!=1:
            c=gcd(c,gc)
            ch+=1

    if ch==0:
        print("pairwise coprime")
    elif c==1:
        print("setwise coprime")
    else:
        print("not coprime")
resolve()