#include <iostream>
#include <vector>
#include <list>
#include<utility>
#include <new>
#include <string>
#include<cmath>
#include<unordered_set>
#include<iomanip>
#include <stack>
#include<queue>
#include<algorithm>
#include<bits/stdc++.h>
using namespace std;
#define loop(i,x,z) for (int i=x;i<z;i++)
using ll =  long long int;
#define mod 1000000007
/*bool cmp(pair<ll,ll>a,pair<ll,ll>b){
return a.second<b.second;
}*/
int main()
{
    int n;
    cin>>n;
    int k,z;
    cin>>k;
    int result = k;
    int f=0;
    loop(i,1,n){
        cin>>z;
        result = __gcd(result,z);
        if(__gcd(k,z)!=1){
            f=1;
        }
    }
    if(f==0){
        cout<<"pairwise coprime";
    }else {
        if(result==1){
            cout<<"setwise coprime";
        }else{
        cout<<"not coprime";
        }
    }
	return 0;
}
