#include <bits/stdc++.h>
using namespace std;

#define int long long int
#define ff first
#define ss second
#define pb push_back
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

const int mod = 1e9 + 7;
const int cmod = 998244353;
const int N = 1e6 + 5;
const int inf = 1e16 + 2;


void solve(int Case) {
    int n ;
    cin >> n;
    int a[n] , mx = 0 , g;
    map<int , int> m ;
    for(int i = 0 ; i < n ; i ++) {
        cin >> a[i] ;
        if(i == 0) g = a[0];
        else g = gcd(g , a[i]);
        mx = max(mx , a[i]);
        m[a[i]] ++;
    }
    int ans = 0 ;
    int p[N];
    memset(p , 0 , sizeof p);
    for(int i = 2 ; i <= mx ; i ++) {
        int cnt = 0;
        if(p[i] == 0) {
            for(int j = i ; j <= mx ; j += i) {
                cnt += m[j];
                p[j] = 1;
            }
        }
        ans = max(ans , cnt);
    }
    if(ans <= 1) cout << "pairwise coprime" << '\n';
    else if(g == 1) cout << "setwise coprime" << '\n';
    else cout << "not coprime" << '\n';
}
/*
 */

int32_t main()
{
    fastio
    int testcase = 1;
    //cin >> testcase;
    int Case = 1;
    while(testcase --) {
        solve(Case ++);
    }
    return 0;
}
