using System;
using System.Linq;

namespace ProgramingStydying
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split().Select(long.Parse).ToArray();
            
            var ans = "pairwise coprime";

            for(int divider = 2; divider <= Math.Sqrt(a.Max()); divider++)
            {
                var flag = 0;

                for(int i = 0; i < n; i++)
                {
                    if(a[i] % divider == 0)
                    {
                        flag++;
                    }
                    if (flag == 2)
                    {
                        break;
                    }
                }

                if(flag == 2)
                {
                    ans = "setwise coprime";
                    break;
                }
            }

            if(ans == "setwise coprime")
            {
                for(int divider = 2; divider <= Math.Sqrt(a.Max()); divider++)
                {
                    var flag = 0;

                    for(int i = 0; i < n; i++)
                    {
                        if(a[i] % divider != 0)
                        {
                            flag++;
                            break;
                        }
                    }

                    if(flag == 0)
                    {
                        ans = "not coprime";
                        break;
                    }
                }
            }

            Console.WriteLine(ans);
        }
    }
}