import sys
input = sys.stdin.buffer.readline

def main():
    N = int(input())
    a = list(map(int,input().split()))
    
    def factrize(x):
        f = set()
        for i in range(2,int(x**(1/2))+1):
            if x%i == 0:
                f.add(i)
                while x%i == 0:
                    x //= i
        if x != 1:
            f.add(x)
        return f
    
    base = factrize(a[0])
    union = base
    intersection = base
    flag = True
    for num in a[1:]:
        base = factrize(num)
        if len(union) + len(base) != len(union|base):
            flag = False
        intersection = intersection & base
        union = union | base
    
    if flag:
        print("pairwise coprime")
    else:
        if intersection:
            print("not coprime")
        else:
            print("setwise coprime")

if __name__ == "__main__":
    main()
