#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);
#define rep(i,n) for (int i=0; i<n;++i)
#define ALL(a)  (a).begin(),(a).end()
typedef long long ll;
using namespace std;
int N;
int A[1000006];
int GCD[1000006];
int is_prime[1000006];

set<int> prime_factor(int n) {
  set<int> ret;
  for(int i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret.insert(i);
      n /= i;
    }
  }
  ret.insert(n);
  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<set<int>> L(N);
  rep(i, N) {
    set<int> s = prime_factor(A[i]);
    L[i] = s;
  }
  
  rep(i, N) {
    for (auto p: L[i]) {
      is_prime[p]++;
      if (is_prime[p]==2) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    } 
  }
  cout << "pairwise coprime" << endl;
  return 0;
}