import sympy
import sys
input = sys.stdin.readline

def main():
    n = int( input() )
    Primes = [ -1 for i in range( 10 ** 6 + 1 ) ]
    Primes_num = []
    I = list( map( int, input().split() ) )
    for i in range( n ):
        a = I[i]
        x = sympy.factorint( a )
        for key in x:
            if Primes[key] != -1:
                Primes_num[ Primes[key] ] += 1
            else:
                Primes_num.append( 1 )
                l = len( Primes_num )
                Primes[ key ] = l - 1
    flag = 1
    flag_ = 1
    for i in Primes_num:
        if i != 1:
            flag = 0
        if i == n:
            flag_ = 0
    if flag == 1:
        print( 'pairwise coprime' )
    elif flag_ == 1:
        print( 'setwise coprime' )
    else:
        print('not coprime')




main()