#include <iostream>
#include <numeric>
#include "vector"
#include "map"
using namespace std;

typedef long long ll;
const ll M = (ll)1e9 + 7;
const int N = (int)2e5 + 10;
string verdicts[]{
    "pairwise coprime",
    "setwise coprime",
    "not coprime",
};
bool is_prime[1001];
int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    for(auto &i : a)
         cin >> i;

    is_prime[1] = false;
    is_prime[2] = true;
    for(int i = 3; i <= 1000; i++)
        is_prime[i] = true;
    for(int i = 2; i <= 1000; i++)
        if(is_prime[i])
            for(int j = i + i; j <= 1000; j += i)
                is_prime[j] = false;
    vector<int> p;
    for(int i = 2; i <= 1000; i++)
        if(is_prime[i]) p.push_back(i);
    map<int, int> d;
    int answer = 2;
    int g = a[0];
    for(int i = 1; i < n; i++)
        g = gcd(a[i], g);
    if(g == 1) answer = 1;
    bool cans = true;
    for(int i = 0; i < n; i++) {
        for(auto j: p) {
            if(a[i] % j == 0) {
                if (d[j] || d[a[i] / j]) {
                    cans = false;
                }
                d[j]++;
                d[a[i] / j]++;
            }
        }
    }
    if(cans)
        answer = 0;
    cout << verdicts[answer];
}