#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <stack>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
using namespace std;
typedef long long ll;
#define free  freopen ("input.txt", "r", stdin);freopen ("output.txt", "w", stdout);
#define Fast  ios::sync_with_stdio(false); cin.tie(0);
#define pb push_back
#define mp make_pair
#define F first
#define S second

bool vowel(char che)
{
    if (che == 'A' || che == 'E' || che == 'I' || che == 'O' || che == 'U' || che == 'Y')
        return true;
    else
        return false;
}

const int N = 1e6+5;
const int mod = 1e9+7;
int a[N], b[N], c, d, dp, dis;
//pair <int, int> p[N];
char o;
bool mark[N], h;
//string s, s1;
//stack <int> st;
//set <ll> st1, st2;
//deque <int> dq;
//vector <int> vt[N];
//int a1[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};


int main()
{
    Fast
    int t, n, m, k = 0, f = 0, sum = 0, ans = 0;
    cin >> n >> m;
    f = m;
    a[m]++;
    for (int i = 1; i < n; i++){
        cin >> m;
        a[m]++;
        f = __gcd(f, m);
    }
    k = 0;
    for (int i = 2; i <= 1e6+5; i++){
        if (mark[i] == false){
            for(int j = i; j <= 1e6+5; j+=i){
                    mark[j] = true;
                if (a[j] > 0)
                    b[k]++;
            }
            k++;
        }
    }
    h = true;
    for (int i = 0; i <= k+1; i++){
        if (b[i] > 1)
            h = false;
    }
    for (int i = 0; i <= 1e6; i++){
        if (a[i] >= 2)
            h = false;
    }
    if (h)
        cout << "pairwise coprime\n";
    else if (f == 1)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";
}
