#include <bits/stdc++.h>
using namespace std;
map<pair<long long, long long>, long long> memo;
long long gcd(long long x, long long y) {
  if (memo[pair<long long, long long>(x, y)] != 0) {
    return memo[pair<long long, long long>(x, y)];
  }
  if (x % y == 0) {
    memo[pair<long long, long long>(x, y)] = y;
    memo[pair<long long, long long>(y, x)] = y;
    return y;
  } else {
    long long t = x % y;
    long long g = gcd(y, t);
    memo[pair<long long, long long>(y, t)] = g;
    memo[pair<long long, long long>(t, y)] = g;
    return g;
  }
}
int main() {
  long long N;
  cin >> N;
  long long A[1000000 + 1];
  long long g1;
  for (long long i = 1; i <= N; i++) {
    cin >> A[i];
    if (i == 1) {
      g1 = A[i];
    } else {
      g1 = gcd(g1, A[i]);
    }
  }
  for (long long i = 1; i <= N - 1; i++) {
    for (long long j = i + 1; j <= N; j++) {
      if (gcd(A[i], A[j]) != 1) {
        if (g1 == 1) {
          cout << "setwise coprime\n";
          return 0;
        } else {
          cout << "not coprime\n";
          return 0;
        }
      }
    }
  }
  cout << "pairwise coprime\n";
}
