/*
 * @Author: AsilenceBTF
 * @Buff: ︿(￣︶￣)︿  芜湖塔台 起飞
 * @Date: 2019-06-20 09:22:24
 * @LastEditTime: 2020-08-30 15:20:56
 */
// #include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
using namespace std;

#define sz(x) int(x.size())
#define ALL(x) x.begin(), x.end()
#define INF 0x3f3f3f3f
typedef long long ll;

const int MOD = 1e9 + 7;
const int N = 1e6 + 105;

int vis[N], a[N];
int main(){
    ios::sync_with_stdio(0), cin.tie(0);
    int n; cin >> n;
    int Gcd;
    for(int i = 1; i <= n; ++i){
        cin >> a[i];
        vis[a[i]] = 1;
        if(i == 1) Gcd = a[i];
        else Gcd = __gcd(Gcd, a[i]);
    }
    int f = 1;
    for(int i = 2; i < N; ++i){
        int s = 0;
        for(int j = i; j < N; j += i){
            if(vis[j]) ++s;
        }
        if(s > 1) f = 0;
    }
    if(f) cout << "pairwise coprime" << endl;
    else if(Gcd == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    // system("pause");    
}