def main():
    from math import gcd

    def soinsuu(a):
        yy, j = set(), 2
        y = yy.add
        while(a > 1):
            for i in range(j, int(a**0.5)+1):
                if a % i == 0:
                    y(i)
                    a, j = a//i, i
                    break
            else:
                y(a)
                break
        return yy
    n = int(input())
    a = list(map(int, input().split()))

    s = set()
    flag = False
    for i in a:
        so = soinsuu(i)
        for j in so:
            if j in s:
                flag = True
                break
            else:
                s.add(j)
        if flag:
            break
    if flag == False:
        print("pairwise coprime")
        return

    temp1 = a[0]
    for i in a[1:]:
        temp1 = gcd(temp1, i)
    if temp1 > 1:
        print("not coprime")
    else:
        print("setwise coprime")


main()
