#include <bits/stdc++.h>
using namespace std;
int N;
int table[10000][10000];
long long int gcd(long long int a, long long int b) {
  bool flag = false;
  if (a < 10000 && b < 10000) {
    flag = true;
  }
  if (flag && table[a][b] > 0) {
    return table[a][b];
  }
  if (b == 0) {
    if (flag) {
      table[a][b] = a;
    }
    return a;
  } else {
    int ans = gcd(b, a % b);
    if (flag) {
      table[a][b] = ans;
    }
    return ans;
  }
}
int main() {
  cin >> N;
  bool setwise = false;
  bool pairwise = true;
  long long int all = 0;
  vector<long long int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    all = gcd(A[i], all);
  }
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (gcd(A[i], A[j]) != 1) {
        pairwise = false;
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (all == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
