/* Ahmed Maher ( Acro_14 ) */
/*while(WA)try();*/
#include <bits/stdc++.h>
typedef long long ll;
const ll oo = 0x3f3f3f3f;
int const N = 1e5+5;
int const mod = 1e9+7;
using namespace std;
/*string Alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string alphabet="abcdefghijklmnopqrstuvwxyz";*/
int gcd(int a, int b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 
 
int findGCD(int arr[], int n) 
{ 
    int result = arr[0]; 
    for (int i = 1; i < n; i++) 
        result = gcd(arr[i], result); 
    return result; 
} 
  
void solve(){
	int n;
	cin>>n;
	int prime[n],arr[n],x,j=0,jj=0,f=1;	

	for(int i=0;i<n;i++)cin>>arr[i];
	
    for(int i=0;i<n;i++)if(__gcd(arr[i],arr[i-1])!=1){f=0;break;}

    int GCD = findGCD(arr,n);

    if(f&&GCD==1) cout<<"pairwise coprime";
    else if(!f&&GCD!=1)cout<<"not coprime";
    else if(!f&&GCD==1)cout<<"setwise coprime";
  
	cout<<endl;
}

int main()
{
  int t;
	t=1;
     while(t--)
    {
       
		solve();
 
    }
	return 0;
}
 
//       int anss[t+1]; 
//            anss[j]=ans;
//     for(int j=1;j<=t;j++) printf("Case %d: %d\n",j,anss[j]);