#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int gcd(int a, int b) {
  if (b == 0) {
    return (a);
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  int N;
  cin >> N;
  ll a = 0;
  int A[N];
  for (int i = 0; i < N; i++) cin >> A[i];
  int b = A[0];
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      int c = gcd(A[i], A[j]);
      if (c != 1) a++;
    }
    b = gcd(b, A[i + 1]);
  }
  if (a == 0)
    cout << "pairwise coprime" << endl;
  else if (b == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
