#include <bits/stdc++.h>
using namespace std;
int spf[100001];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 100001; i++) spf[i] = i;
  for (int i = 4; i < 100001; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 100001; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 100001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
set<int> getFactorization(int x) {
  set<int> ret;
  while (x != 1) {
    ret.insert(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
class Graph {
  int V;
  vector<list<int>> edges;

 public:
  Graph(int nodes) {
    V = nodes;
    edges.resize(nodes + 1);
  }
  void addEdge(int from, int to) { edges[from].push_back(to); }
  int min_dist(int &fin, int i, map<int, bool> &special, vector<bool> &check) {
    check[i] = true;
    multiset<int> ms;
    int k;
    for (auto it = edges[i].begin(); it != edges[i].end(); it++) {
      if (check[*it] == true) continue;
      k = min_dist(fin, *it, special, check);
      if (k != 0) ms.insert(k);
    }
    for (auto it = ms.begin(); it != ms.end(); it++) {
      fin += (*it);
    }
    if (ms.size() % 2 == 0) {
      if (special[i]) return 1;
      return 0;
    } else {
      if (special[i]) return 0;
      auto it = ms.begin();
      fin -= (*it);
      return (*it) + 1;
    }
  }
  int max_comp() {
    int mx = INT_MIN;
    vector<bool> check(V + 1, false);
    for (int i = 1; i <= V; i++) {
      if (!check[i]) {
        int count = 0;
        DFS_util(check, i, count);
        if (count > mx) {
          mx = count;
        }
      }
    }
    return mx;
  }
  void DFS_util(vector<bool> &check, int i, int &count) {
    check[i] = true;
    count++;
    for (auto it = edges[i].begin(); it != edges[i].end(); it++) {
      if (!check[*it]) {
        DFS_util(check, *it, count);
      }
    }
    return;
  }
};
int main() {
  sieve();
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    vector<int> arr;
    int temp;
    for (int i = 0; i < n; i++) {
      cin >> temp;
      arr.push_back(temp);
    }
    map<int, int> mp;
    set<int> s = getFactorization(arr[0]);
    for (auto it = s.begin(); it != s.end(); it++) {
      mp[*it]++;
    }
    int f = 0;
    for (int i = 1; i < n; i++) {
      set<int> temp = getFactorization(arr[i]);
      for (auto it = temp.begin(); it != temp.end(); it++) {
        mp[*it]++;
        if (f == 0 && s.count(*it)) {
          f = 1;
        } else {
          s.insert(*it);
        }
      }
    }
    if (f == 0) {
      cout << "pairwise coprime" << endl;
    } else {
      for (auto it = mp.begin(); it != mp.end(); it++) {
        if (it->second >= n) {
          cout << "not coprime" << endl;
          return 0;
        }
      }
      cout << "setwise coprime" << endl;
    }
  }
  return 0;
}
