#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x < y) swap(x, y);
  if (x % y == 0) return y;
  return gcd(y, x % y);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int amax = 0;
  set<int> s;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    amax = max(amax, A[i]);
    s.insert(A[i]);
  }
  sort(A.begin(), A.end());
  vector<int> used(amax + 1, 0);
  int flag = 0;
  for (int i = 2; i <= amax; i++) {
    if (used[i] == 1) continue;
    used[i] = 1;
    int t = i * 2;
    flag = 0;
    while (t <= amax) {
      used[t] = 1;
      if (s.count(t)) {
        if (flag == 0)
          flag = 1;
        else if (flag == 1)
          flag = 2;
        else
          break;
      }
      t += i;
    }
    if (flag == 2) break;
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = A[0];
  for (int i = 0; i < N; i++) {
    g = gcd(g, A[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
