#include <bits/stdc++.h>
using namespace std;
long long dp[1000010];
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  for (long long i = 2; i < 1000010; i++) {
    if (!dp[i]) {
      for (long long j = i; j < 1000010; j += i) dp[j] = i;
    }
  }
  dp[1] = 1;
  long long ok = 1;
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long x = arr[i];
    while (x != dp[x]) {
      if (mp[dp[x]]) {
        if (mp[dp[x]] != i + 1) ok = 0;
      }
      mp[dp[x]] = i + 1;
      x /= dp[x];
    }
    if (x != 1) mp[x] = i + 1;
  }
  if (ok) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    ans = gcd(ans, arr[i]);
  }
  if (ans == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
