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

#define int long long
#define flash ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define all(x) begin(x),end(x)

int mod = 1e9+7;
int inf = 4e18;
const int N = 5e5+5;
		
signed main()
{
    flash
    int tt = 1;
    //cin>>tt;
    while(tt--)
    {
		int n;
		cin>>n;
		int arr[n],pre[n];
		for(int i=0;i<n;++i)
		{
			cin>>arr[i];
			if(i==0)
			pre[i] = arr[i];
			else
			pre[i] = __gcd(pre[i-1],arr[i]);
		}
		int gcdd = arr[0];
		for(int i=1;i<n;++i)
		{
			gcdd = __gcd(gcdd,arr[i]);
		}
		bool flag = false;
		for(int i=n-1;i>0;--i)
		{
			if(__gcd(arr[i],pre[i-1])!=1)
			{
				flag = true;
				break;
			}
		}
		if(!flag)
		{
			cout<<"pairwise coprime";
		}
		else if(gcdd==1)
		{
			cout<<"setwise coprime";
		}
		else
		{
			cout<<"not coprime";
		}		
    }
    return 0;
}
