#include <bits/stdc++.h>
using namespace std;
vector<string> SPLIT(string str, char ch) {
  vector<string> res;
  stringstream ss(str);
  string s;
  while (getline(ss, s, ch)) res.push_back(s);
  return res;
}
long long STOI(string str, int base) {
  long long res = 0;
  for (auto c : str) {
    res *= base;
    res += c - '0';
  }
  return res;
}
string ITOS(long long val, int base) {
  string res;
  while (val > 0) {
    res += '0' + (val % base);
    val /= base;
  }
  reverse((res).begin(), (res).end());
  return res;
}
vector<int> prime = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31};
int n;
vector<int> arr;
void runcase() {
  cin >> n;
  arr.resize(n);
  for (auto& u : arr) cin >> u;
  sort((arr).begin(), (arr).end());
  unordered_map<long long, long long> cnt_map;
  for (auto u : arr) {
    int iter = 0;
    unordered_map<long long, long long> t;
    int cur = 2;
    while (u != 1) {
      if (u % cur == 0) {
        t[cur] = 1;
        u /= cur;
      } else {
        cur++;
      }
    }
    for (auto u : t) {
      cnt_map[u.first] += t[u.first];
    }
  }
  int pn = prime.size();
  int res = 1;
  for (auto u : cnt_map) {
    if (u.second >= 2) {
      res = 2;
    }
  }
  if (res == 2) {
    for (auto u : cnt_map) {
      if (u.second == n) {
        res = 3;
        break;
      }
    }
  }
  if (res == 1) {
    cout << "pairwise coprime\n";
  } else if (res == 2) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  runcase();
  return 0;
}
