#include <algorithm>
#include <iostream>
#include <vector>
#include<map>
using namespace std;

int a[1000005];
bool p = true;

int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n;i++)
        cin >> a[i];
    int t = a[0];
    for (int i = 1; i < n;i++){
        t = __gcd(t, a[i]);
        if(t!=1)
            p = false;
    }
    int k = t;

    if(t==1 && p){
        cout << "pairwise coprime";
    }else if(k==1)
        cout << "setwise coprime";
    else
        cout << "not coprime";

    return 0;
}
