#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
const long long int MAX_N = 500010;
const long long int INF = 999999999999;
long long int gcd(long long int a, long long int b) {
  long long int M = max(a, b);
  long long int m = min(a, b);
  if (m == 0) {
    return M;
  }
  return gcd(m, M % m);
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) cin >> a[i];
  vector<bool> sosuu(1001001, false);
  vector<long long int> D(1001001);
  for (long long int i = 0; i < 1001001; i++) {
    D[i] = i;
  }
  for (long long int i = 2; i < 1001001; i++) {
    long long int now = i;
    while (now < 1001001) {
      if (!sosuu[now]) {
        sosuu[now] = true;
        D[now] = i;
      }
      now += i;
    }
  }
  vector<bool> f(1001001, false);
  bool flag = false;
  for (long long int i = 0; i < n; i++) {
    long long int x = a[i];
    while (x > 1) {
      if (f[D[x]]) {
        flag = true;
        break;
      }
      f[D[x]] = true;
      while (x % D[x] == 0 && x > 1) {
        x /= D[x];
      }
    }
    if (flag) break;
  }
  if (!flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long int g = a[0];
  for (long long int i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
