/*--ILRS-- sr4saurabh  */
#include <bits/stdc++.h>
using namespace std; 
typedef long long int ll;
#define pb push_back 
#define popb pop_back
#define mp make_pair
#define ve vector
#define vii vector < int >
#define vll vector < ll > 
#define pii pair < int , int >
#define pll pair < ll , ll >
#define vpl vector < pll >
#define fi first
#define sz size 
#define len length 
#define se second 
//const ll mod=998244353;
const ll mod = 1000000000+7;
const ll N=10000000+6;
#define M_PI           3.14159265358979323846
//--------------------------------------------



//--------------------------------------------




int c[1000000 + 5];
//============================================
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    #ifndef ONLINE_JUDGE
       freopen ("INPUT.txt" , "r" , stdin);
       freopen ("OUTPUT.txt", "w" , stdout);
    #endif

	//THE WATER WAS DEEP, I DROWNED AND THEN CAME FLOATING UP,DEAD!!


        ll n;
        cin>>n;
        int arr[n];
        int ma = -1 ;
        for(int i = 0 ; i < n ; i++)
        {
          int v ;
          cin>>v;
          arr[i] = v;
          c[v]++;
          ma = max(ma,v);
        }

        int dp[ma+1]={0};

        for(ll j = ma; j >=1 ; j--)
        {
          ll c_p = 0;
            for(ll k = 1; k*j <= ma ; k++)
                c_p += c[k*j];

            ll co_p = c_p*(c_p-1)/2;
            ll sum = 0;
            for(ll k = 2; k*j <= ma ; k++)
            {
              sum = sum + dp[k*j];
            }

            dp[j] = co_p-sum;
            
        }

        //cout<<dp[1]<<'\n';


        ll tot_pair = n*(n-1)/2;

        if(tot_pair == dp[1])
        {
          cout<<"pairwise coprime";
          return 0;
        }

        int gc = arr[0];
        for(int i = 1 ; i < n ;i++)
          gc = __gcd(gc , arr[i]);

        if(gc == 1)
        {
          cout<<"setwise coprime";
          return 0;
        }

        cout<<"not coprime";








return 0;
}