#include <bits/stdc++.h>
using namespace std;
long long a[1000000 + 5];
vector<long long> v;
constexpr auto mod = 1000000 + 7;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n, flag = 1, flag1 = 1, product = 1, product1 = 1, lcm1 = 1;
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    product1 = product1 * a[i] % mod;
  }
  for (int i = 1; i <= n; i++) {
    lcm1 = a[i] / gcd(lcm1, a[i]) * lcm1 % mod;
  }
  if (lcm1 == product1) return cout << "pairwise coprime", 0;
  for (int i = 1; i < n; i++) {
    if (gcd(a[i], a[i + 1]) != 1) {
      a[i + 1] = gcd(a[i], a[i + 1]);
      flag++;
    } else
      break;
  }
  if (flag != 1 && flag != n) {
    cout << "setwise coprime";
    return 0;
  }
  if (flag == n) cout << "not coprime";
  return 0;
}
