#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string &s) { return '"' + s + '"'; }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  bool first = true;
  string ret = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      ret += ", ";
    }
    first = false;
    ret += to_string(v[i]);
  }
  ret += "}";
  return ret;
}
template <size_t N>
string to_string(bitset<N> v) {
  string ret = "";
  for (size_t i = 0; i < N; i++) {
    ret += static_cast<char>('0' + v[i]);
  }
  return ret;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string ret = "{";
  for (const auto &x : v) {
    string s = to_string(x);
    if (!first) {
      ret += ", ";
    }
    if (s[0] == '{') {
      s = "\n" + s;
    }
    first = false;
    ret += s;
  }
  if (ret[ret.size() - 1] == '}') {
    ret += "\n}";
  } else {
    ret += "}";
  }
  return ret;
}
template <typename A, typename... Lest>
string to_string(A *v, int n, Lest... L) {
  bool first = true;
  string ret = "{";
  for (int i = 0; i < n; i++) {
    auto x = v[i];
    string s = to_string(x, L...);
    if (!first) {
      ret += ", ";
    }
    if (s[0] == '{') {
      s = "\n" + s;
    }
    first = false;
    ret += s;
  }
  if (ret[ret.size() - 1] == '}') {
    ret += "\n}";
  } else {
    ret += "}";
  }
  return ret;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void name_disp(string s) {
  cerr << "-------" << endl;
  cerr << s << ": " << endl;
}
void val_disp() { cerr << endl; }
template <typename First, typename... Lest>
void val_disp(First F, Lest... L) {
  cerr << to_string(F) << endl;
  val_disp(L...);
}
template <typename A, typename... Lest>
void val_disp(A *v, Lest... L) {
  cerr << to_string(v, L...) << endl;
  val_disp();
}
const int INF = 1002003004;
const int M = 100000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0},  {1, 1},   {0, 1},  {-1, 1},
                         {-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
int gcd(int a, int b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
const int MAX_N = 1000010;
bool primeDp[MAX_N];
vector<int> getPrimes(int n) {
  int u = n + 32;
  double lu = log(u);
  vector<int> ret((int)(u / lu + u / lu / lu * 1.5));
  for (int i = 2; i <= n; i++) primeDp[i] = true;
  int sqn = sqrt(n);
  for (int i = 2; i <= sqn; i++) {
    if (!primeDp[i]) continue;
    for (int j = i * i; j <= n; j += i) primeDp[j] = false;
  }
  int idx = 0;
  for (int i = 2; i <= n; i++) {
    if (primeDp[i]) {
      ret[idx] = i;
      idx++;
    }
  }
  return vector<int>(ret.begin(), ret.begin() + idx);
}
vector<pair<int, int> > primeFact(vector<int> primes, int a) {
  if (a == 1) {
    return vector<pair<int, int> >({make_pair(1, 1)});
  }
  vector<pair<int, int> > ret;
  for (int i = 0; i < primes.size(); i++) {
    int num = 0;
    int p = primes[i];
    while (a % p == 0) {
      a /= p;
      num++;
    }
    if (num > 0) {
      ret.push_back(make_pair(p, num));
    }
  }
  if (a > 1) {
    ret.push_back(make_pair(a, 1));
  }
  return ret;
}
int n, a[1000100];
int num[1000100];
signed main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  vector<int> primes = getPrimes(1000000);
  bool pairwise = true;
  for (int i = 0; i < n; i++) {
    vector<pair<int, int> > vec = primeFact(primes, a[i]);
    for (int j = 0; j < vec.size(); j++) {
      int p = vec[j].first;
      if (num[p] > 0) {
        pairwise = false;
        break;
      } else {
        num[p]++;
      }
    }
    if (!pairwise) {
      break;
    }
  }
  if (pairwise) {
    printf("pairwise coprime\n");
  } else {
    int c = a[0];
    for (int i = 0; i < n - 1; i++) {
      c = gcd(c, a[i + 1]);
    }
    if (c == 1) {
      printf("setwise coprime\n");
    } else {
      printf("not coprime\n");
    }
  }
  return 0;
};
