/******************************************
* AUTHOR : SOMU KUMAR *
* INSTITUTION : IIT BHUBANESWAR *
******************************************/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define N 100005
#define MOD 1000000007
#define pb push_back
#define mk make_pair
#define pii pair<int,int>
#define pll pair<ll,ll>
ll gcd(ll a,ll b){
	return (long)__gcd(a,b);
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
//code here...............//
int n;
cin>>n;
ll arr[n];
ll x=1;
for(int i=0;i<n;i++){
	cin>>arr[i];
	if(i==0)x=gcd(arr[i],arr[i]);
	x=gcd(x,arr[i]);
}
if(x!=1){
	cout<<"not coprime"<<endl;
	return 0;
}
x=1;
for(int i=n-2;i>=0;i--){
	x=gcd(arr[i],arr[i+1]);
	arr[i]=((long)arr[i]*(long)arr[i+1]);
	if(x!=1){
		cout<<"setwise coprime"<<endl;
		return 0;
	}
}
cout<<"pairwise coprime"<<endl;
return 0;
}