#include<bits/stdc++.h>

#define gcd(a,b)     __gcd(a,b)
#define lcm(a,b)     (a*(b/gcd(a,b)))

#define pb   push_back
#define endl "\n"

#define ll  long long
#define ull unsigned long long

#define W(t)            while(t--)
#define rep(i,n)      for(i = 0; i < n; i++)
#define repit(it,type)  for(auto it = type.begin(); it != type.end(); it++)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;

int main()
{
    IOS
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ll n,i;
    cin>>n;
    ll a[n];
    ll ans=0,res=0;

    for(i = 0; i < n; i++)
    	cin>>a[i];
    ans = a[0];
    for(i = 1; i < n; i++)
    	{
    		ans = gcd(a[i],ans);
    		if(ans!=1)
    			res=1;
    	}
    	if(res==0)
    		cout<<"pairwise coprime\n";
    	else if(ans==1)
    		cout<<"setwise coprime\n";
    	else
    		cout<<"not coprime\n";
     return 0;
}