using System;
using System.Linq;

namespace ConsoleApp8
{
    class Program
    {

        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int prime = 0;
            int ab = 0;
            int bol = 0;
            for (int i = 0; i < N - 1; i++)
            {
                for (int j = i + 1; j < N; j++)
                {
                    int b = a[i];
                    int c = a[j];
                    if (a[i] < a[j])
                    {
                        int tmp = b;
                        b = c;
                        c = tmp;
                    }

                    int r = b % c;
                    while (r != 0)
                    {
                        b = c;
                        c = r;
                        r = b % c;
                    }
                    if (c != 1) { ab = c; prime = 1; break; }
                }
            }
            if (prime == 0) { Console.WriteLine("pairwise coprime"); }
            if (prime == 1)
                {
                    for(int k = 0; k < N; k++)
                    {
                        if((a[k] % ab) != 0)
                        {
                        bol = 1;
                        }
                    }
                if (bol == 1)
                {
                    Console.WriteLine("setwise coprime");
                }
                if (bol == 0)
                {
                    Console.WriteLine("not coprime");
                }
            }
        }
    }
}
