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

const int N = 1e6 + 10;
int n,a[N];

int main(void)
{
	ios :: sync_with_stdio(false);
	cin.tie(0);
	
	cin >> n;
	int flag = 0;
	int p = 1;
	
	for(int i = 0;i < n;i++) cin >> a[i];
	
	p = a[0];
	
	for(int i = 1;i < n;i++)
	{
		p = __gcd(p,a[i]);
		
		if(p != 1) flag = 1;
	}
	
	if(p != 1) cout << "not coprime"<<endl;
	else if(flag == 1) cout << "setwise coprime"<<endl;
	else cout <<"pairwise coprime"<<endl;
	
	return 0;
}