#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int INFint = 1e9 + 1;
const ll INFll = (ll)1e18 + 1;
ll MOD = 1e9 + 7;
bool isprime(ll n) {
  if (n == 1) return false;
  for (ll i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i(0); i < N; i++) cin >> A[i];
  vector<int> sosuu;
  for (int i(2); i <= 1000000; i++) {
    if (isprime(i)) {
      sosuu.push_back(i);
    }
  }
  int k = int(sosuu.size());
  vector<int> used(k, 0);
  for (int i(0); i < N; i++) {
    for (int j(0); j < k; j++) {
      if (A[i] % sosuu[j] == 0) {
        used[j]++;
      }
    }
  }
  int maxi(0);
  for (int i(0); i < k; i++) {
    maxi = max(maxi, used[i]);
  }
  if (maxi <= 1)
    cout << "pairwise coprime" << endl;
  else if (maxi < N)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
