#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
vector<bool> seen;
void dfs(const Graph &G, int v) {
  seen[v] = true;
  for (auto next_v : G[v]) {
    if (seen[next_v]) continue;
    dfs(G, next_v);
  }
}
bool IsPrime(int num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
long long GCD(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
int main() {
  long long N, sl;
  cin >> N;
  long long A[1000010];
  long long P[1000010];
  set<long long> s;
  long long tmp2 = 0;
  long long cc = 0;
  for (int i = 0; i < N; i++) {
    long long tmp;
    cin >> tmp;
    A[i] = tmp;
    s.insert(tmp);
    if (tmp % 2 == 0) cc++;
  }
  if (cc >= 2) {
    goto loopend;
  }
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; ++j) {
      if (GCD(A[i], A[j]) != 1) goto loopend;
    }
    if (i == N - 2) {
      cout << "pairwise coprime" << endl;
      return 0;
    }
  }
loopend:
  long long tmp = 0;
  for (int i = 0; i < N; i++) {
    tmp = GCD(A[i], tmp);
  }
  if (tmp == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
