using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace contest_Csharp
{

    class Program
    {
        public static (long m, long s)[,] dp;
        public static long mod;
        
        public static List<int> getprimes(int n)
        {
            var result = new List<int>();
            result.Add(2);
            int i = 3;
            while (result.Last() <= n)
            {
                var flg = true;
                foreach(var p in result)
                {
                    if (i % p == 0)
                    {
                        flg = false;
                    } 
                }
                if (flg)
                    result.Add(i);
                i = i + 2;
            }
            return result;
        }
        static void Main(string[] args)
        {
            checked
            {
                var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
                Console.SetOut(sw);

                var vals = Console.ReadLine().Split(' ').
                    Select(x => int.Parse(x)).ToList();


                var N = vals[0];
                //var M = vals[1];
                //var S = vals[2];
                var A = Console.ReadLine().Split(' ').
                    Select(x => int.Parse(x)).ToList();

                var ans = "";


                var primes = getprimes(1000);
                var usedprime = new bool[1050];

                var pairflg = true;
                A.Sort();

                
                for (int i = 0; i < N; i++)
                {
                    foreach(var p in primes)
                    {
                        if (A[i] % p == 0)
                        {
                            if (usedprime[p])
                            {
                                pairflg = false;
                                break;
                            }
                            else
                                usedprime[p] = true;
                        }
                    }
                    if (i >= 1 && A[i]==A[i-1])
                    {
                        pairflg = false;
                    }
                    if (!pairflg)
                        break;
                }
                if (pairflg)
                {
                    ans = "pairwise coprime";
                }
                else
                {
                    var G = A[0];
                    for (int i = 1; i < N; i++)
                    {
                        G = (int)gcd(G, A[i]);
                    }
                    ans = (G == 1) ? "setwise coprime" : "not coprime";
                }
                

                
                
                Console.WriteLine(ans);

                Console.Out.Flush();
            }//cheked




        }
        static long gcd(long a, long b)
        {
            long large = Math.Max(a, b);
            long small = Math.Min(a, b);
            while (large % small != 0)
            {
                var S = small;
                small = large % small;
                large = S;
            }
            return small;
        }
    }

}


