#include<bits/stdc++.h>
using namespace std;
const int N=2e6+10;
int a[N];
int main(){
	int n,f=0;
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=1;i<n;i++)
		a[i+1]=__gcd(a[i],a[i+1]);
	if(a[n]==1) cout<<"pairwise coprime";
	else cout<<"setwise coprime";
	return 0;
}