#include <bits/stdc++.h>

using namespace std;

const int N = 1e6 + 5;
char c[N];

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);

  int n;
  cin >> n;
  if (n >= 80000) {
    int g = 0;
    for (int i = 0, x; i < n; ++i) {
      cin >> x;
      g = gcd(x, g);
    }
    cout << (g == 1 ? "setwise coprime" : "not coprime");
  } else {
    int g = 0;
    bool pc = true;
    for (int i = 0, x; i < n; ++i) {
      cin >> x;
      g = gcd(x, g);
      for (int j = 2; j * j <= x; ++j) {
        if (x % j) continue;
        if (c[j]) pc = false;
        c[j] = true;
        while (x % j == 0) x /= j;
      }
      if (x != 1) {
        if (c[x]) pc = false;
        c[x] = true;
      }
    }
    cout << (g == 1 ? (pc ? "pairwise coprime" : "setwise coprime") : "not coprime");
  }

  return 0;
}
