#include <bits/stdc++.h>
using namespace std;
int a[1000000 + 5];
bool prime[1000000 + 5];
int b[1000000 + 5];
vector<int> v;
void is_prime() {
  for (int i = 2; i <= sqrt(1000000 + 5) + 1; i++) {
    if (prime[i] == false) {
      for (int j = i * i; j < 1000000 + 5; j += i) {
        prime[j] = true;
      }
    }
  }
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n, flag = 1, flag1 = 1;
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  is_prime();
  for (int i = 2; i <= 1000000; i++) {
    if (prime[i] == false) v.push_back(i);
  }
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < v.size(); j++) {
      if (v[j] <= a[i] && a[i] % v[j] == 0) {
        b[j]++;
        if (b[j] > 1) {
          flag1 = 0;
          break;
        }
      }
    }
    if (flag1 == 0) {
      break;
    }
    if (i == n) {
      cout << "pairwise coprime";
      return 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";
  if (flag == n) cout << "not coprime";
  return 0;
}
