#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  cin >> N;
  vector<long long> data(N);
  vector<long long> ct(1000005, 0);
  for (long long(i) = long long(0); (i) < long long(N); (i)++) {
    cin >> data[i];
  }
  for (long long(i) = long long(0); (i) < long long(N); (i)++) {
    long long a = data[i];
    long long now = 2;
    while (1) {
      long long ok = 0;
      while (1) {
        if ((a % now) == 0) {
          a /= now;
          ok = 1;
        } else {
          break;
        }
      }
      if (ok == 1) ct[now]++;
      if (now * now > data[i]) break;
      now++;
    }
    if (a != 1) ct[a]++;
  }
  long long ans = 0;
  for (long long(i) = long long(0); (i) < long long(1000005); (i)++) {
    if (ct[i] == N) {
      cout << ("not coprime") << endl;
      return 0;
    }
    if (ct[i] >= 2) {
      ans = 1;
    }
  }
  if (ans == 1) {
    cout << ("setwise coprime") << endl;
  } else {
    cout << ("pairwise coprime") << endl;
  }
  return 0;
}
