using System;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int number = int.Parse(Console.ReadLine());
        
            string[] chara = Console.ReadLine().Split('　');
            int[] box = new int[number];
            
            for(int i = 0; i < number; i++)
            {
                box[i] = int.Parse(chara[i]);
            }

            string[] answer = { "pairwise coprime", "setwise coprime", "not coprime" };
            Console.WriteLine(answer[Check(box)]);
   
        }

        static public int Gojo(int a,int b)//a < bで入力
        {
            int alpha = a;
            int beta = b;
            int r = beta % alpha;

            if (r != 0)
            {
                while (true)
                {
                    beta = alpha;
                    alpha = r;

                    r = beta % alpha;

                    if (r == 0) break;
                }
       
            }

            return alpha;

        }

        static public int Check(int[] a)
        {
            int first;
            int second;

            int answer;
            int flag; //0:pairwise coprime , 1:setwise coprime , 2:not coprime

            for(int i=0;i<a.Length-1;i++)
            {
                first = a[i];
                second =a[i + 1];

                answer = Gojo(first, second);

                if (answer != 1)
                {
                    flag = 2;
                    return flag;
                }

            }

            if (a.Length == 2)
            {
                flag = 0;
                return flag;
            }
            else
            {
                flag = 1;
                return flag;
            }

        }
    }
}
