#include <bits/stdc++.h>
using namespace std;
int GCD(int x, int y) {
  if (x < y) swap(x, y);
  while (y > 0) {
    x = x % y;
    swap(x, y);
  }
  return x;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  int sup = 1010;
  int flag = 0;
  int table[sup];
  for (int i = 0; i < sup; ++i) {
    table[i] = 0;
  }
  for (int i = 0; i < N; ++i) {
    int num = A[i];
    for (int j = 2; j < sup; ++j) {
      if (num == 1) break;
      if (num % j != 0) continue;
      while (num % j == 0) {
        num /= j;
        if (table[j] == 1) flag = 1;
      }
      table[j] = 1;
    }
    if (flag == 1) break;
  }
  for (int i = 1; i < N; ++i) {
    if (A[i] == A[i - 1]) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
  }
  int gcd = A[0];
  for (int i = 1; i < N; ++i) {
    gcd = GCD(gcd, A[i]);
  }
  if (flag == 1) {
    if (gcd == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
