#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <unordered_map>
#include <set>
#include <map>
#define INCANT cin.tie(0), cout.tie(0), ios::sync_with_stdio(0), cout << fixed << setprecision(20);
#define rep(i,n) for (int i=0; i<n;++i)
#define ALL(a)  (a).begin(),(a).end()
#define PI 3.14159265358979
typedef long long ll;
using namespace std;
const ll MOD = 1e9+7LL;
const int INF = 2e9;
int N;
int A[1000006];
int GCD[1000006];
int is_prime[1003];

vector<int> sieve(int n){
  for (int i=0; i <= n; i++) is_prime[i]=true;
  is_prime[0]=is_prime[1]=false;
  for (int i = 2; i <= n; i++){
    if (is_prime[i]){
      for (int j=2*i; j <= n; j+=i) is_prime[j] = false;
    }
  }
  vector<int> ret;
  for (int i=2; i<=n; i++) {
    if (is_prime[i]) ret.push_back(i);
  }
  return ret;
}

int main() {
  INCANT;
  cin >> N;
  rep(i, N) cin >> A[i];
  GCD[0] = A[0];
  rep(i, N-1) GCD[i+1] = gcd(GCD[i], A[i+1]);
  if (GCD[N-1]>1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<int> primes = sieve(1000);
  int idx=0;
  while(idx<primes.size()) {
    bool flag = false;
    rep(i, N) {
      if (A[i]%primes[idx]==0){
         if (!flag) flag=true;
         else {
           cout << "setwise coprime" << endl;
           return 0;
         }
      }
    }
    idx++;
  }
  cout << "pairwise coprime" << endl;
  return 0;
}