#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lli = long long int;
using ld = long double;
ll gcd(ll a, ll b) {
  ll r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  ll n, ans, cnt = 0;
  cin >> n;
  ll ar[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      ans = gcd(ar[i], ar[j]);
      if (ans == 1) {
        cnt++;
      }
    }
  }
  if (cnt == n)
    cout << "pairwise coprime"
         << "\n";
  else {
    ll b[n], c = 0;
    for (int i = 0; i < n - 1; i++) {
      b[i] = abs(ar[i + 1] - ar[i]);
    }
    for (int i = 0; i < n - 1; i++) {
      if (b[i + 1] - b[i] == 1) {
        c++;
      }
    }
    if (c == n - 2) {
      cout << "setwise coprime"
           << "\n";
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
