#include <bits/stdc++.h>
using namespace std;
int arr1[1000050];
bool gcdback(int a, int b)
{
     return (__gcd(a, b) == 1);
}
bool coprimeall (int n)
{
    int max1=n;
    bool here=true;
    int pref[10000]={0};
    for(int i=0;i<n;i++)
    {
        int x=arr1[i];
        for(int j=2;j*j<=x;j++)
        {
            if(x%j==0)
            {
                pref[j]++;
                while(x%j==0)
                {
                   x/=j;
                }
            }
            if(pref[j]>=max1)
            {
                here=false;
            }
        }
        if(x!=1)
            {pref[x]++;
             if(pref[x]>=max1)
            {
                here=true;
            }
            }
    }
    return here;
}
int solveitabdo(int n)
{
	int count1 = 0;
	for (int i = 0; i < n - 1; i++)
	{
		for (int j = i + 1; j < n; j++)
		{
			if (gcdback(arr1[i],arr1[j])==1)
			{
				count1++;
			}
			else
                return count1;
		}
	}
	return count1;
}
int main()
{
	int  n, counter = 0;
	scanf("%d",&n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d",&arr1[i]);
	}
	counter = solveitabdo(n);
	if (counter==n)
    {
        printf("pairwise coprime");
    }
    else if (coprimeall(n))
    {
        printf("setwise coprime");
    }
    else
    {
        printf("not coprime");
    }
}
