#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; ++i) cin >> a[i];
  vector<int> left(N + 1, 0), right(N + 1, 0);
  for (int i = 0; i < N; ++i) left[i + 1] = GCD(left[i], a[i]);
  int ans = 1;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (GCD(a[i], a[j]) != 1) {
        ans = 0;
        break;
      }
    }
    if (ans == 0) {
      break;
    }
  }
  if (ans == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    if (left[N] == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
