def main():
    import sys
    sys.setrecursionlimit(10**6)
    input = sys.stdin.readline
    N = int(input())
    A = [int(x) for x in input().strip().split()]

    def gcd(x, y):
        if y == 0:
            return x
        return gcd(y, x % y)

    pairwise_coprime = A[0]
    setwise_coprime = A[0]
    for n in range(1, N):
        t = gcd(pairwise_coprime, A[n])
        if t > 1:
            pairwise_coprime = 0
        else:
            pairwise_coprime *= A[n]
        setwise_coprime = gcd(setwise_coprime, A[n])
    
    if pairwise_coprime:
        print('pairwise coprime')
    elif setwise_coprime == 1:
        print('setwise coprime')
    else:
        print('not coprime')

if __name__ == '__main__':
    main()