#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <random>
#include <unordered_map>
#include <unordered_set>

using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
#define rep(i,n) for(ll i = 0;i < (ll)n;i++)
#define ALL(x) (x).begin(),(x).end()
#define MOD 1000000007

vector<int> p;
vector<int> sieve(int n){
  vector<bool> used(n+1,0);
  for(int i = 2;i <= n;i++){
    if(used[i])continue;
    p.push_back(i);
    for(int j = i;j <= n;j += i){
      used[j] = true;
    }
  }
  return p;
}

int main(){
  
  sieve(1000);
  int n;
  cin >> n;
  vector<int> v(n);
  rep(i,n)cin >> v[i];
  int setwise = v[0];
  rep(i,n)setwise = __gcd(setwise,v[i]);
  if(n > 78498){
    if(setwise == 1){
      cout << "setwise coprime\n";
    }else {
      cout << "not coprime\n";
    }
    return 0;
  }
  bool pa = 1;
  map<int,int> mp;
  rep(i,n)rep(j,p.size()){
    if(p[j] > v[i])break;
    if((v[i]%p[j]) == 0)mp[p[j]]++;
  }
  for(auto au : mp)if(au.second > 1)pa = false;
  if(pa){
    cout << "pairwise coprime\n";
  }else if(setwise == 1){
    cout << "setwise coprime\n";
  }else {
    cout << "not coprime\n";
  }
  

  return 0;
}