#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const long double pi=acos(-1);
#define x  first
#define y  second
#define read(n,a) for(int i=0;i<n;i++)cin>>a[i];
#define rep(z,n)  for(int i=z;i<n;i++)

ll a[2000002]={};
//ll b[2000002]={};
ll n,m;

int main()
{
    cin.tie(0);
    cin.sync_with_stdio(0);
    ///freopen("ss.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int t=1;
    //cin>>t;
    while(t--)
    {
       cin>>n;
       read(n,a);
       ll g=__gcd(a[0],a[1]);
       rep(0,n)
       {
           g=__gcd(g,a[i]);
       }
       if(g!=1)return cout<<"not coprime",0;
       rep(0,n-1)
       {
           g=__gcd(a[i],a[i+1]);
           if(g!=1;)
           {
               cout<<"setwise coprime";
               return 0;
           }
       }
       cout<<"pairwise coprime";
    }
    return 0;
}
