#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
typedef long long  ll;
//ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a;}
#define N 1000010
const int A = 1000005;
int main()
{
    int n; cin >> n;
    vector<int> a(n);
    vector<int> c(A);
   for(int i=0; i<n; i++){
       cin >> a[i];
       c[a[i]]++;
   }

   bool pairwize = true;
   for(int i=2; i<A; i++){
       int cnt = 0;
       for(int j=i; j<A; j += i){
           cnt += c[j];
       }
       if(cnt > 1) pairwize = false;
   }
   if(pairwize){
       cout << "pairwise coprime" << endl; 
       return 0;
   }

   int g = 0;
   for(int i=0; i<n; i++) g = gcd(g, a[i]);
   if(g==1) { 
       cout << "setwize coprime" << endl; 
       return 0;
   }

   cout << "not coprime" << endl;
    return  0;
}