

#include<bits/stdc++.h>
#define ll long long 
#define vt vector<int>

const int M = 1e9+7, mxN=2e5;
int a[mxN], sum=0;
int n;

using namespace std;

int main(){
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  
   cin>>n; 
   for(int i=0;i<n;i++)
	   cin>>a[i];
   
  int result = a[0];

  for(int i=1;i<n;i++)
	  result = __gcd(a[i], result);
  if(result==1)
  {
	  cout<<"setwise coprime";
	  exit(0);
  }
 

  int re = __gcd(a[0],a[1]);

  for(int i=1;i<n-1;i++){
	   for(int j=i+1;j<n;j++){
           if(__gcd(a[i],a[j]) == re)
			   re = __gcd(a[i],a[j]);
		   else
			   cout<<"not coprime";
	   }
  }

  cout<<"pairwise coprime";
  
 }
