/**
 * author: said_v15
**/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
//#include <__msvc_all_public_headers.hpp>
 
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
 
typedef long long  ll;

#define press_F_to_pay_respect ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define forn for(int i=0;i<n;i++) 
#define fore(i,a,b) for(int i = a; i < (b); i++)
#define pb push_back 
#define pob pop_back()
#define mp make_pair 
#define sc second 
#define f first 
#define th third
#define ld long double
#define kek cout<<"\n"; 
#define rep(i,a,b) for(int i=a;i<b;i++)
#define all(v) ((v).begin()), ((v).end()) 
#define halt {cout<<"NO"; return 0;}


const ll MOD = 1e9 + 7;
const ll MOD1 = 998244353;
const int MAXN = 1000100;
const int INF = 1e8;
const ll LL_INF=1e10;
const double pi=3.1415926535;
using namespace std;
int divide(int a, int b)
{
          return (a+b-1)/b;
}
int main()
{
    #if defined(_DEBUG)
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
    #endif
 press_F_to_pay_respect;
 // cout << fixed << setprecision(12) << ans;
 // string al = "abcdefghijklmnopqrstuvwxyz";
 int questions=1;
// cin>>questions;
 while(questions--)
 {
     int n;
     cin>>n;
     vector<int> v(n);
     forn cin>>v[i];
     int g=v[0];
     for(int i=1;i<n;i++) g=__gcd(g,v[i]);
     if(g!=1) 
     {
               cout<<"not coprime";
               return 0;
     }
     ll to=1e6+10;
     vector<bool> prime (to, true);
     prime[0] = prime[1] = false;
      for (int i=2; i<=to; ++i)
	if (prime[i])
		if (i * 1ll * i <= to)
			for (int j=i*i; j<=to; j+=i)
				prime[j] = false;
   int cnt=0;
   forn
   {
             if(prime[v[i]]) cnt++;
   }
   if(cnt>n-2) 
   {
             cout<<"pairwise coprime";
   }
   else
   {
             cout<<"setwise coprime";
   }
     
     
           
 }
 
 
 // !!! LOOK AT NUMBER OF QUESTIONS IN A PROBLEM !!! (cin>>questions)
 

  // cout <<"Runtime is:"<<clock() * 1.0 / CLOCKS_PER_SEC <<endl;
   return 0;
   
}