#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vb = vector<bool>;
using vll = vector<long long>;
using pii = pair<int, int>;
using psi = pair<string, int>;
string p = "pairwise coprime";
string s = "setwise coprime";
string n = "not coprime";
ll gcd(ll a, ll b) {
  ll x = min(a, b);
  ll y = max(a, b);
  if (y % x == 0) {
    return x;
  } else {
    return gcd(y % x, x);
  }
}
int main() {
  int N;
  cin >> N;
  vi data(N);
  for (int i = 0; i < N; i++) {
    cin >> data[i];
  }
  bool check = true;
  vi num(1000000, 0);
  for (int i = 0; i < N - 1; i++) {
    int n = data[i];
    for (int a = 2; a * a <= n; a++) {
      if (n % a == 0) {
        num[a]++;
      }
      if (num[a] > 1) {
        check = false;
        break;
      }
      while (n % a == 0) {
        n /= a;
      }
    }
    if (n != 1) {
      num[n]++;
    }
    if (num[n] > 1) {
      check = false;
    }
    if (!check) {
      break;
    }
  }
  if (check) {
    cout << p << endl;
    return 0;
  }
  int ans = data[0];
  for (int i = 1; i < N; i++) {
    ans = gcd(ans, data[i]);
  }
  if (ans == 1) {
    cout << s << endl;
  } else {
    cout << n << endl;
  }
}
