def resolve():
    import sys
    from fractions import gcd
    input = sys.stdin.readline
    n=int(input())
    a=list(map(int,input().split()))
    m=10**6+5
    chk=[0]*m
    for i in a:
      chk[i]+=1
    pw=1
    for i in range(2,m):
      cnt=0
      for j in range(i,m,i):
        cnt+=chk[j]
      if cnt>1:
        pw=0
        break
    g=a[0]
    for i in a[1:]:
      g=gcd(g,i)
    if pw==2:
      print('pairwise coprime')
    elif g==1:
      print('setwise coprime')
    else:
      print('not coprime')

if __name__ == '__main__':
    resolve()