#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> A(n, 0);
  for (int i = 0; i < n; i++) cin >> A[i];
  bool b = true;
  for (int i = 1; i < n; i++) {
    if (gcd(A[i], A[i - 1]) != 1) {
      b = false;
      break;
    }
  }
  if (b) {
    cout << "pairwise coprime";
    return 0;
  }
  int result = A[0];
  for (int i = 1; i < n; i++) {
    result = gcd(A[i], result);
    if (result == 1) break;
  }
  if (result == 1) {
    cout << "setwise coprime";
    return 0;
  } else
    cout << "not coprime";
}
