#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 1e6 + 1e3 + 1;
const long long MOD = 1e9 + 7;
const double PI = 3.141592653589793;
int main() {
  int n;
  cin >> n;
  int table[1000100];
  int lis[1000100];
  fill(lis, lis + 1000100, 0);
  fill(table, table + 1000100, 0);
  for (int i = 2; i < 1000010; i++) {
    if (lis[i] == 0) {
      lis[i] = 1;
      for (int j = 2; i * j < 1000010; j++) {
        if (lis[i * j] == 0) lis[i * j] = i;
      }
    }
  }
  lis[2] = 1;
  bool flag = true;
  for (int i = 0; i < (int)(n); i++) {
    int a;
    cin >> a;
    int j = a;
    while (1) {
      int k = lis[j];
      if (table[k] && k != 1) flag = false;
      table[k]++;
      if (lis[j] == 1) {
        if (table[j] && j != 1) flag = false;
        table[j]++;
      }
      if (k == 1) break;
      while (lis[j] == k || j == k) j /= k;
      if (j == 1) break;
    }
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (int i = 2; i < 1000010; i++) {
    if (table[i] == n) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
}
