#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
 
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());
 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
 
 int gcd(int a, int b){ 
    if (a == 0) 
        return b;  
    return gcd(b % a, a);  
 } 
  
   
  // Function to return LCM of two numbers  
  int lcm(int a, int b)  
  {  
     return (a*b)/gcd(a, b);  
  }  

void c_p_c()
{
   ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);  
   int n, prod = 1, lc, gc;
   cin >> n;

   vector<int> v(n + 1);
   for (int i = 0; i < n; i++) {
   		cin >> v[i];
   		prod = prod * v[i];
   		if (i == 0) {
   			lc = v[i];
   			gc = v[i];
   		}
   		if (i > 0) {
   			lc = lcm(lc, v[i]);
   			gc = gcd(gc, v[i]);
   		}
   }

   if (lc == prod) {
   	cout << "pairwise coprime";
   }
   else if (gc == 1) {
   	cout <<"setwise coprime";
   }
   else {
   	cout <<"not coprime";
   }
 }
 
int32_t main()
{
    c_p_c();
    return 0;
}