#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, -1, 0, 1};
const int LIT = 1e9 + 7;
int n, m;
vector<int> arr(1000001, 0);
vector<bool> prime(1000001, true);
set<int> s;
int gcd(int a, int b) {
  while (a % b != 0) {
    int t = a % b;
    a = b;
    b = t;
  }
  return b;
}
void solve() {
  cin >> n;
  for (int i = 2; i <= (int)sqrt(1000000); i++) {
    for (int j = i + i; j <= 1000000; j += i) {
      prime[j] = false;
    }
  }
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    for (int j = 2; j <= (int)sqrt(x); j++) {
      if (prime[j]) {
        if (x % j == 0) {
          arr[j]++;
        }
      }
    }
  }
  bool check = true;
  for (int i = 2; i <= 1000; i++) {
    if (arr[i] == n) {
      cout << "not coprime";
      goto out;
    } else if (arr[i] > 1)
      check = false;
  }
  if (check)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
out:
  return;
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
