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

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            Array.Sort(a);

            if (Pairs(a).All(nums => GCD(nums) == 1))
            {
                Console.WriteLine("pairwise coprime");
                return;
            }
            if (GCD(a) == 1)
            {
                Console.WriteLine("setwise coprime");
                return;
            }
            Console.WriteLine("not coprime");
        }

        static IEnumerable<(int, int)> Pairs(int[] nums)
        {
            for (int i = 0; i < nums.Length - 1; i++)
            {
                for (int j = i + 1; j < nums.Length; j++)
                {
                    yield return (nums[i], nums[j]);
                }
            }
        }

        static int GCD((int a,int b) num )
        {
            int a = num.b;
            int b = num.a;
            while (a % b != 0)
            {
                int tmp = a % b;
                a = b;
                b = tmp;
            }
            return b;
        }

        static int GCD(IEnumerable<int> nums)
        {
            int min = nums.Min();

            foreach(int denom in Divisors(min))
            {
                if (nums.All(n => n % denom == 0)) return denom;
            }
            return 1;
        }

        static IEnumerable<int> Divisors(int x)
        {
            yield return x;
            for (int denom = x / 2; denom > 1; denom--)
            {
                if (x % denom == 0)
                {
                    yield return denom;
                }
            }
        }
    }
}