#include <cstdio>
#include <iostream>
#include <cassert>
#include <string>
#include <algorithm>
#include <cstring>
#include <utility>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <deque>
#include <unordered_map>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

using namespace std;
using namespace __gnu_pbds;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> order_set;
const int MAXN = 1234567;
int lfactor[MAXN], visit[MAXN];

int main() {
    for (int i = 2; i < MAXN; i++) {
        if (lfactor[i]) continue;
        for (int j = i; j < MAXN; j += i) {
            lfactor[j] = i;
        }
    }
    int N;
    scanf("%d", &N);
    bool OK = true;
    int g = 0;
    for (int i = 0; i < N; i++) {
        int A;
        scanf("%d", &A);
        g = __gcd(A, g);
        set<int> st;
        while (A > 1) {
            st.insert(lfactor[A]);
            A /= lfactor[A];
        }
        for (auto i : st) {
            if (visit[i]) OK = false;
            visit[i] = 1;
        }
    }
    if (g != 1) puts("not comprime");
    else if (OK) puts("pairwise coprime");
    else puts("setwise coprime");
    return 0;
}
/* stuff you should look for
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* WRITE STUFF DOWN
by Benq;
*/
