#include <iostream>
#include <algorithm>
#include<map>
#include<vector>
#include<string>
#include <climits>
#include<set>
#include<cmath>
#include<bitset>
using namespace std;
#define ll long long
#define M 1000000007

int main() {
     ll n;cin>>n;
     vector<ll> a(n,0);
     for(int i=0;i<n;i++)
     {
         cin>>a[i];
     }
     int f=0;
     for(int i=0;i<n-1;i++)
     {
         for(int j=i+1;j<n;j++)
         {
             if((__gcd(a[i],a[j]))!=1)
             {
                 f=1;
                 break;
             }
         }
         if(f==1)
         {
             break;
         }
     }
     int l=0;
     if(f==0)
     {
         cout<<"pairwise coprime"<<endl;
         l=1;
     }
     ll k1=a[0];
     for(int i=1;i<n;i++)
     {
         k1=(__gcd(k1,a[i]));
     }
     if((k1==1)&&(l==0))
     {
         cout<<"setwise coprime"<<endl;
     }
     else if((k1!=1)&&(l==0)){
         cout<<"not coprime"<<endl;
     }
    return 0;
}
