#include <bits/stdc++.h>
using namespace std;
int main ()
{
    long long int n;
    cin>>n;
    long long int a[n];
    for (long long int i=0;i<n;i++)
    cin>>a[i];
  bool flag=0;
    
    long long int count=0,total=0;
    //total = (n*(n-1))/2;
    for (int i=0;i<(n-1);i++)
    {
        for (int j=i+1;j<n;j++)
        {
            if ( __gcd(a[i],a[j]) == 1)
            count++;
            else
            {
                flag=1;
                break;
            }
        }
    }
    if (flag!=1)
    cout<<"pairwise coprime"<<endl;
    else
    {
        long long int ans=a[0];
        for (int i=1;i<n;i++)
        {
            ans = __gcd(ans,a[i]);
        }
        if (ans == 1)
        cout<<"setwise coprime"<<endl;
        
        else
        cout<<"not coprime"<<endl;
    }
    
    return 0;
    
}