/*
* @author:  codancer
* @createTime:  2020-08-31, 23:21:52
*/

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9+7;
#define pb push_back
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define fep(i,a,b) for(int i=(a);i>=(b);i--)
#define deb(x) cerr<<#x<<" = "<<(x)<<"\n"
typedef vector<int> VI;
typedef vector<ll> VII;
typedef pair<int,int> pii;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll Rand(ll B) {
	return (ull)rng() % B;
}
const int N = 1e6+100;
int cnt[N];
int main(){
	int n;
	cin>>n;
	vector<int> a(n);
	rep(i,0,n-1) scanf("%d",&a[i]);
	rep(i,0,n-1){
		int x=a[i];
		for(int j=2;j*j<=x;j++){
			if(x%j==0){
				cnt[j]++;
				while(x%j==0) x/=j;
			}
		}
		if(x!=1) cnt[x]++;
	}
	//rep(i,2,10) cout<<i<<' '<<cnt[i]<<endl;
	int ans=a[0];
	bool finds=0;
	rep(i,0,n-1){
		vector<int> fac;
		int x=a[i];
		for(int j=2;j*j<=x;j++){
			if(x%j==0){
				if(cnt[j]>=2){
					finds=1;
					break;
				}
			}
		}
		if(x!=1) if(cnt[x]>=2) finds=1;
		if(finds) break;
	}
	rep(i,0,n-1) ans=__gcd(ans,a[i]);
	if(!finds){
		puts("pairwise coprime");return 0;
	}
	if(ans==1){
		puts("setwise coprime");
		return 0;
	}
	puts("not coprime");
	return 0;
}