#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
 
#include <bits/stdc++.h>
#include <fstream>
#include<string.h>
#include <algorithm>
#include<math.h>
#include<vector>
#include <queue>
#include <deque> 
#define ll unsigned long long
#define M 1000000007 
#define MM 998244353
#define INF (1LL<<60)-1
using namespace std;
 
 
int main()
{
    std::ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
        ll n,i,j,k;
        cin>>n;
        ll a[n];
        ll prod=1;
        for(i=0;i<n;i++)
        {
            cin>>a[i];
            prod*=a[i];
        }
        ll gd=__gcd(a[0],a[1]),lm=(a[0]*a[1])/gd;
        for(i=2;i<n;i++)
        {
            gd=__gcd(gd,a[i]);
            lm=(lm*a[i])/__gcd(a[i],lm);
        }
        if(gd!=1)cout<<"not coprime\n";
        else if(lm!=prod)cout<<"setwise coprime\n";
        else cout<<"pairwise coprime\n";
        /*tcitr++;
    }*/
    return 0;
}
