#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
bool isPrime[1001];
int a[1000000];
int main() {
  for (int i = 0; i < (1001); ++i) isPrime[i] = true;
  int n;
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  int ans = 0;
  for (int i = 2; i <= 1000; i++) {
    if (isPrime[i]) {
      for (int j = i; j <= 1000; j += i) {
        isPrime[j] = false;
      }
      int dividable = 0;
      for (int j = 0; j < (n); ++j) {
        if (a[j] % i == 0) dividable++;
      }
      if (dividable >= 2) ans = 1;
    }
  }
  if (ans == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = a[0];
  for (int i = 0; i < (n - 1); ++i) {
    g = gcd(a[i + 1], g);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
