#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int main() {
  bool E[1001];
  for (int i = 2; i <= 1000; i++) E[i] = true;
  for (int i = 2; i <= 1000; i++) {
    if (!E[i]) continue;
    int j = i + i;
    while (j <= 1000) {
      E[j] = false;
      j += i;
    }
  }
  vector<int> C;
  for (int i = 2; i <= 1000; i++)
    if (E[i]) C.push_back(i);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  sort(A.begin(), A.end());
  bool ans = false;
  for (int i = 0; i < N - 1; i++)
    if (A[i] == A[i + 1] && A[i] != 1) ans = true;
  int sum = 0;
  for (int i = 0; i < C.size(); i++) {
    for (int j = 0; j < N; j++)
      if (A[j] % C[i] == 0) sum++;
    if (sum >= 2) ans = true;
    if (sum == N) {
      cout << "not coprime" << endl;
      return 0;
    }
    sum = 0;
  }
  if (ans)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
