#include <bits/stdc++.h>
using namespace std;
int n, a[1000010], x;
bool p[1000010], f[1000010], k;
vector<int> prime;
int main() {
  p[0] = p[1] = 1;
  for (int i = 2; i <= 1000000; i++)
    if (p[i] == 0)
      for (int j = i + i; j <= 1000000; j += i) p[j] = 1;
  for (int i = 0; i <= 1000000; i++)
    if (p[i] == 0) prime.push_back(i);
  cin >> n;
  for (int i = 0; i < 1000010; i++) a[i] = 1e9;
  for (int i = 0; i < n; i++) {
    cin >> x;
    for (int j = 0; j < prime.size(); j++) {
      int num = 0;
      while ((x % prime[j]) == 0) {
        num++;
        x /= prime[j];
      }
      a[j] = min(a[j], num);
      if (f[j] == 1 && num > 0) k = 1;
      if (num > 0) f[j] = 1;
    }
  }
  if (k == 0)
    cout << "pairwise coprime" << endl;
  else {
    k = 0;
    for (int i = 0; i <= 1000000; i++)
      if (a[i] == 0 || a[i] == 1000000000)
        continue;
      else
        k = 1;
    if (k == 1)
      cout << "not coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  }
  return 0;
}
