#include <bits/stdc++.h>
using namespace std;
bool br[2000000];
void siv() {
  memset(br, true, 2000000);
  int i, j;
  br[0] = false;
  br[1] = false;
  for (i = 2; i * i <= 2000000; i++) {
    if (br[i] == true) {
      for (j = i * i; j <= 2000000; j += i) {
        br[j] = false;
      }
    }
  }
}
int prime(int n) {
  int i, j;
  for (i = 2; i <= n; i++) {
    if (br[i] == true) {
      if (n % br[i] == 0) {
        return i;
      }
    }
  }
}
int main() {
  int n, i, j, gd;
  while (cin >> n) {
    siv();
    vector<int> v;
    int x, c = 0, z;
    for (i = 0; i < n; i++) {
      cin >> x;
      if (br[x] == true) {
        v.push_back(x);
      } else {
        z = prime(x);
        v.push_back(z);
      }
    }
    sort(v.begin(), v.end());
    if (v[0] == v[n - 1])
      cout << "not coprime" << endl;
    else {
      for (i = 0; i < n; i++) {
        if (v[i] == v[i + 1]) {
          c++;
          if (c >= 1) {
            break;
          }
        }
      }
      if (c == 0)
        cout << "pairwise coprime" << endl;
      else
        cout << "setwise coprime" << endl;
    }
  }
}
