using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Diagnostics.Tracing;

namespace Main
{
    class Program
    {
        static void Main(string[] args)
        {
            //ここから
            //int n=ReadInt();
            //string[] str = Console.ReadLine().Split(' ');
            int n = ReadInt();
            int[] a = ReadArray(n);
            bool isP = true;

            int max = a.Max();

            //zentai gcd
            int Gcd = gcd(a[0], a[1]);
            for (int i = 2; i < n; i++)
            {
                Gcd = gcd(Gcd, a[i]);
                if (Gcd == 1) break;
            }

            if (Gcd != 1)
            {
                Cout("not coprime");
                return;
            }

            bool[] insu = new bool[max+1];
            for(int i = 0; i < max+1; i++)
            {
                insu[i] = false;
            }

            for(int i = 0; i < n; i++)
            {
                int k = a[i];
                int j = 2;

                while (j * j <= a[i])
                {
                    if(k % j == 0)
                    {
                        while (k % j == 0)
                        {
                            k /= j;
                        }
                        if (insu[j])
                        {
                            Cout("setwise coprime");
                            return;
                        }
                        insu[j] = true;
                    }
                    j++;
                }
                if (insu[k])
                {
                    Cout("setwise coprime");
                    return;
                }
                insu[k] = true;
            }

            

            if (isP) Cout("pairwise coprime");
            else Cout("setwise coprime");

            //ここまで
        }

        static int gcd(int a, int b)
        {
            if (a > b)
            {
                int temp = a;
                a = b;
                b = temp;
            }

            while (true)
            {
                int amari = b % a;
                if (amari == 0) { return a; }
                b = a;
                a = amari;
            }
        }



        static void Cout(string s)
        {
            Console.WriteLine(s);
            return;
        }

        static void Cout(int n)
        {
            Console.WriteLine(n);
            return;
        }

        static void Cout(long n)
        {
            Console.WriteLine(n);
            return;
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static int[] ReadArray(int n)
        {
            string[] str = Console.ReadLine().Split(' ');
            int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = int.Parse(str[i]); }
            return a;
        }
        static long[] ReadArray(long n)
        {
            string[] str = Console.ReadLine().Split(' ');
            long[] a = new long[n];
            for (long i = 0; i < n; i++) { a[i] = long.Parse(str[i]); }
            return a;
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int Min(int a, int b)
        {
            if (a < b) return a;
            return b;
        }

        static int Max(int a, int b)
        {
            if (a > b) return a;
            return b;
        }


    }

}
