from fractions import gcd

def main():
    n = int(input())
    A = list(map(int,input().split()))
    
    last_a = A[0]
    all_one = True
    for a in A[1:]:
        if gcd(last_a,a) == 1:
            last_a = a
        else:
            all_one = False
            break
    if all_one:
        print("pairwise coprime")
        return

    all_gcd = A[0]
    for a in A:
        all_gcd = gcd(all_gcd,a)
    if all_gcd == 1:
        print("setwise coprime")
        return
    

    

            
    print("not coprime")
    return

if __name__ == "__main__":
    main()