#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int n;
    cin >> n;
    vector<int>arr(n);
    for (int i = 0; i < n; i++)
        cin >> arr[i];
    int var = arr[0];
    for (int i = 1; i < n; i++)
        var = __gcd(arr[i], var);
    if (var > 1)
        cout << "not coprime";
    else {
        set<int>nums;
        for (int i = 0; i < n; i++) {
            int temp = arr[i];
            for (int j = 2; j * j <= arr[i]; j++) {
                if (arr[i] % j == 0) {
                    temp = j;
                    break;
                }
            }
            nums.insert(temp);
        }
        int sz = nums.size();
        if (sz == n)
            cout << "pairwise coprime";
        else
            cout << "setwise coprime";
    }

    return 0;
}