#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define scn(n) scanf("%d",&n)
#define lscn(n) scanf("%lld",&n)
#define pri(n) printf("%d",n)
#define lpri(n) printf("%lld",n)
#define priln(n) printf("%d\n",n)
#define lpriln(n) printf("%lld\n",n)
#define F first
#define S second
#define vec vector<int>
#define map map<int,int>
#define gcd __gcd
const int mod=1e9+7;
const int N=1e6;

vector<int> prime;
int temp[N+5];
void seive()
{
    for(int i=2;i<=N;i++)
    {
        if(temp[i]==0)
        {
            prime.push_back(i);
            for(int j=2*i;j<=N;j=j+i)
            temp[j]=1;
        }
    }
}

int main()
{
    int t=1;
    //cin>>t;

    while(t--)
    {
        int n;
        cin>>n;
        
        int arr[n+1];
        for(int i=0;i<n;i++)
        cin>>arr[i];
        
        seive();
        
        set<int> s;
        int flag=0;
        
        int hcf=arr[0];
        for(int i=1;i<n;i++)
        {
            hcf=gcd(hcf,arr[i]);
         //   cout<<hcf<<" ";
        }
            
        for(int i=0;i<n;i++)
        {
            if(arr[i]==1)
            continue;
            
            if(temp[arr[i]]==0)
            {
                if(s.find(arr[i])!=s.end())
                {
                    flag=1;
                    break;
                }
                else
                s.insert(arr[i]);
                
                continue;
            }
            
            int val=sqrt(arr[i]);
            for(int j=0;j<prime.size();j++)
            {
                if(prime[j]>val)
                break;
                
                if(arr[i]%prime[j]==0)
                {
                    if(s.find(prime[j])!=s.end())
                    {
                        flag=1;
                        break;
                    }
                    else
                    s.insert(prime[j]);
                    while(arr[i]%prime[j]==0)
                    arr[i]/=prime[j];
                }
                
                if(arr[i]==0)
                break;
            }
        }
        
        if(flag==0)
        cout<<"pairwise coprime";
        
        else
        {
            if(hcf==1)
            cout<<"setwise coprime";
            
            else
            cout<<"not coprime";
        }
    }
    return 0;
}