#include<bits/stdc++.h>
using namespace std;
 
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define endl "\n"
const int N=1e9+7;
#define int long long
#define double long double

int32_t main()
{
  #ifndef ONLINE_JUDGE
      freopen("input.txt", "r", stdin);
      freopen("output.txt", "w", stdout);
  #endif
 IOS;
int n;
cin>>n;
int a[n];
for (int i = 0; i < n; ++i)
{
	/* code */cin>>a[i];
}
int dp[n];
dp[0]=a[0];
int f=0;
for (int i = 1; i < n; ++i)
{
	dp[i]=__gcd(a[i],dp[i-1]);
	if(dp[i]>1)
	{
		f=1;
	}
}

if(f==1&&dp[n-1]==1)
	cout<<"setwise coprime";
 if(f==1&&dp[n-1]!=1)
	cout<<"not coprime";
 if(f==0)
	cout<<"pairwise coprime";



 	



  
 




  
return 0;
}
