#include <bits/stdc++.h>
using namespace std;
#define M ((int)1e9+7)
int main() {
    // your code goes here
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    int n;
    cin>>n;
    int a[n],an=0;
    for(int i=0;i<n;i++)
    	cin>>a[i];
    set<int> pf;
    bool pc=true;
    for(int i=0;i<n;i++)
    {
    	an=__gcd(an,a[i]);
    	for(int j=2;j*j<=a[i];j++)
    	{
    		if(a[i]%j)	continue;
    		if(pf.count(j))	pc=false;
    		else pf.insert(j);
    	}
    }
    if(pc)	cout<<"pairwise coprime";
    else if(an==1)	cout<<"setwise coprime";
    else cout<<"not coprime";
    return 0;
}