#include <bits/stdc++.h>
using namespace std;
int prime[1000001];
void SieveOfEratosthenes() {
  memset(prime, -1, sizeof(prime));
  prime[1] = 1;
  for (long long int p = 2; p * p <= 1000000; p++) {
    if (prime[p] == -1) {
      prime[p] = p;
      for (int i = p * p; i <= 1000000; i += p) {
        if (prime[i] == -1) {
          prime[i] = p;
        }
      }
    }
  }
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int test = 1;
  SieveOfEratosthenes();
  while (test--) {
    int n;
    cin >> n;
    map<int, int> m;
    bool ok = 1;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      set<int> s;
      while (x > 1) {
        s.insert(prime[x]);
        x /= prime[x];
      }
      for (auto &j : s) {
        m[j]++;
        if (m[j] > 1) {
          ok = 0;
        }
      }
    }
    if (ok) {
      cout << "pairwise coprime" << endl;
    } else {
      ok = 1;
      for (auto &i : m) {
        if (i.second == n) {
          ok = 0;
        }
      }
      if (ok) {
        cout << "setwise coprime" << endl;
      } else {
        cout << "not coprime" << endl;
      }
    }
  }
  return 0;
}
