#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<int> prime;
bool is_prime[1010];
void sieve(int n) {
  int p = 0;
  for (int i = 0; i <= n; i++) is_prime[i] = true;
  is_prime[0] = is_prime[1] = false;
  for (int i = 0; i <= n; i++) {
    if (is_prime[i]) {
      prime.push_back(i);
      p++;
      for (int j = 2 * i; j <= n; j += i) {
        is_prime[j] = false;
      }
    }
  }
  return;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N);
  vector<vector<int> > v(N);
  for (int i = 0; i < (N); i++) {
    cin >> A[i];
  }
  int b1 = 0;
  int b2 = 0;
  b1 = A[N - 1];
  for (int i = 0; i < (N - 1); i++) {
    b1 = gcd(b1, A[i]);
  }
  if (b1 != 1) cout << "not coprime" << endl;
  sieve(1009);
  for (int i = 0; i < (N); i++) {
    for (int j = 0; prime[j] * prime[j] <= A[i]; j++) {
      if (A[i] % prime[j] == 0) v[prime[j]].push_back(i);
    }
  }
  for (int i = 0; i < (N); i++) {
    if (v[i].size() >= 2) {
      b2 = 1;
    }
  }
  if (b1 == 1 && b2 == 1) cout << "setwise coprime" << endl;
  if (b2 != 1) cout << "pairwise coprime" << endl;
}
