def main():
    N = int(input())
    A = list(map(int, input().split()))
    pairwise = True
    onef = set()
    allf = set()
    a = A[0]
    i = 2
    while i * i <= a:
        if a % i == 0:
            while a % i == 0:
                a //= i
            allf.add(i)
            onef.add(i)
        i += 1
    
    for a in A[1:]:
        thisf = set()
        i = 2
        while i * i <= a:
            if a % i == 0:
                while a % i == 0:
                    a //= i
                if i in onef:
                    pairwise = False
                else:
                    onef.add(i)
                thisf.add(i)
            i += 1
        allf &= thisf
    if pairwise:
        return 'pairwise coprime'
    if len(allf) == 0:
        return 'setwise coprime'
    return 'not coprime'

print(main())
