#include <bits/stdc++.h>
using namespace std;

int main()
{
    int num;
    cin >> num;
    array<int,1000010> v;
    for(int i=0;i<num;i++){
        cin >> v[i];
    }

    sort(v.begin();v.end());
    
    bool pair = true;
    bool set = true;
    int index = 0;
    for(int i=2;i<=2;i++){
        int count = 0;
        for(int j=index;j<num;j++){
            if(v[j]%i == 0){
                count ++;
            }
        }
        if(count > 1){
            pair = false;
        }
        if(count == num){
            set = false;
            break;
        }

        if(i>v[index]){
            index ++;
            if(pair == false){
                break;
            }
        }
    }
    for(int i=3;i<=sqrt(v[num-1]);i+=2){
        int count = 0;
        for(int j=index;j<num;j++){
            if(v[j]%i == 0){
                count ++;
            }
        }
        if(count > 1){
            pair = false;
        }
        if(count == num){
            set = false;
            break;
        }

        while(i>v[index]){
            index ++;
        }
        
    }
    
    if(pair){
        cout << "pairwise coprime\n";
    }else if(set){
        cout << "setwise coprime\n";
    }else{
        cout << "not coprime\n";
    }
    return 0;
}