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

typedef long long ll;
typedef unsigned long long ull;
typedef long double dl;

#define F first
#define S second
#define ALL(a) a.begin(),a.end()
#define mp make_pair
#define pb push_back
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define FORN(i,a,b) for(int i=a;i<=b;i++)
#define INT_MAXI 2147483647
#define INT_MINI -2147483648
#define REV(a) reverse(a.begin(),a.end())
#define NP(a) next_permutation(a.begin(),a.end())

typedef pair<int,int> pi;
typedef pair<ll,ll> pl; 


#define MAX 1000001

int smallPrimeFactor[MAX];
// Hash to store prime factors count
int hash1[MAX] = { 0 };
void getSmallestPrimeFactor() {
   smallPrimeFactor[1] = 1;
   for (int i = 2; i < MAX; i++)
      smallPrimeFactor[i] = i;
   for (int i = 4; i < MAX; i += 2)
      smallPrimeFactor[i] = 2;
   for (int i = 3; i * i < MAX; i++) {
      if (smallPrimeFactor[i] == i) {
         for (int j = i * i; j < MAX; j += i)
            if (smallPrimeFactor[j] == j)
               smallPrimeFactor[j] = i;
      }
   }
}
void factorizationResult(int x) {
   int temp;
   while (x != 1) {
      temp = smallPrimeFactor[x];
      if (x % temp == 0) {
         hash1[smallPrimeFactor[x]]++;
         x = x / smallPrimeFactor[x];
      }
      while (x % temp == 0)
      x = x / temp;
   }
}
bool hasCommonFactors(int x) {
   int temp;
   while (x != 1) {
      temp = smallPrimeFactor[x];
      if (x % temp == 0 && hash1[temp] > 1)
      return false;
      while (x % temp == 0)
      x = x / temp;
   }
   return true;
}
bool hasValueToFormCoPrime(int arr[], int n) {
   getSmallestPrimeFactor();
   for (int i = 0; i < n; i++)
   factorizationResult(arr[i]);
   for (int i = 0; i < n; i++)
   if (hasCommonFactors(arr[i]))
   return true;
   return false;
}
int main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	//cout<<"input"<<endl;freopen("input.txt","r",stdin);
	//cout<<"output"<<endl;freopen("output.txt","w",stdout);
	int arr[1000005];
	int n;
	cin>>n;
	FORN(i,1,n){
		cin>>arr[i];
	}
	int mm = arr[1];
	FORN(i,2,n){
		mm = __gcd(mm, arr[i]);
	}
	bool awal =  hasValueToFormCoPrime(arr, n);
	if( awal == true && mm == 1)
		cout<<"pairwise coprime";
	else if(awal == true)
		cout<<"setwise coprime";
	else
		cout<<"not coprime";
	cout<<endl;
}
