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