//Author - Soumik Roy
//Date & Time - August 29, 2020 7:35 PM
//Problem name - E - Coprime
//Problem url - https://atcoder.jp/contests/abc177/tasks/abc177_e
//Time limit - 2000 ms
//Memory Limit - 1024 MB    

#include<bits/stdc++.h>
#define ll                    long long int
#define pb                    push_back
#define F                     first
#define S                     second
#define mp                    make_pair
#define MOD                   1000000007
#define vi                    vector<int>
#define vll                   vector<ll>
#define pll                   pair<ll,ll>
#define pii                   pair<int,int>
#define all(p)                p.begin(),p.end()
#define mid(s,e)              (s+(e-s)/2)
#define eb                    emplace_back
#define ull                   unsigned long long
#define bug(x)				  cout<<"  [ "#x<<" = "<<x<<" ]"<<endl;
#define KAMEHAMEHA            ios_base::sync_with_stdio(0);
#define RASENGAN              ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
int dir[]={0,1,0,-1,1,0,-1,0};
void solve()
{
	ll n;
	cin>>n;
	vll a(n+1);
	ll gcd=0;
	for(ll i=0;i<n;i++)
	{
		cin>>a[i];
		gcd=__gcd(a[i],gcd);
	}
	ll lcm=a[0],p=a[0];
	for(ll i=1;i<n;i++)
	{
		lcm=(lcm*a[i])/__gcd(lcm,a[i]);
		p*=a[i];
	}
	if(lcm==p)
		cout<<"pairwise coprime"<<endl;
	else if(gcd==1)
		cout<<"setwise coprime"<<endl;
	else
	{
		cout<<"not coprime"<<endl;
	}
	
}
int main()
{
    KAMEHAMEHA
	int t=1;
	//cin>>t;
	for(int cn=1;cn<=t;cn++)
	{
		solve();
	}
    return 0;
}

