#include <bits/stdc++.h>
using namespace std;
int n, arr[1000000];
bool prime[1001];
void sieve(int n) {
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; ++p) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) {
        prime[i] = false;
      }
    }
  }
  prime[0] = false;
  prime[1] = false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  sieve(1001);
  bool a = true, b = true;
  for (int i = 2; i < 1001; ++i) {
    if (prime[i]) {
      int count = 0;
      for (int j = 0; j < n; ++j) {
        if (arr[j] % i == 0) count++;
      }
      if (count >= 2) {
        a = false;
      }
      if (count == n) {
        b = false;
        break;
      }
    }
  }
  if (a) {
    cout << "pairwise coprime";
  } else if (!a && b) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
