#include <bits/stdc++.h>

using namespace std;

template<class INT>
constexpr const std::vector<INT> get_min_prime_fact_table(const INT n) noexcept {
    std::vector<INT> lp(n + 1), P;
    for (INT i = 2; i <= n; i++){
        if (lp[i] == 0){
            lp[i] = i;
            P.push_back(i);
        }
        for (INT j = 0; j <= P.size() and P[j] <= lp[i] and i * P[j] <= n; j++)
            lp[i * P[j]] = P[j];
    }

    return lp;
}

template<class INT>
constexpr const std::vector<INT> prime_factorize(INT n, const std::vector<INT>& lp) noexcept {
    vector<INT> res;
    while (n != 1){
        res.push_back(lp[n]);
        n /= lp[n];
    }

    return res;
}

/**
 * @brief 高速入出力
 * @author えびちゃん
 * @see https://qiita.com/rsk0315_h4x/items/17a9cb12e0de5fd918f4
 */
 
namespace fast {
  static constexpr size_t buf_size = 1 << 17;
  static constexpr size_t margin = 1;
  static char inbuf[buf_size + margin] = {};
  static __attribute__((aligned(8))) char outbuf[buf_size + margin] = {};
  static __attribute__((aligned(8))) char minibuf[32];
  static constexpr size_t int_digits = 20;  // 18446744073709551615
  static constexpr uintmax_t digit_mask = 0x3030303030303030;
  static constexpr uintmax_t first_mask = 0x00FF00FF00FF00FF;
  static constexpr uintmax_t second_mask = 0x0000FFFF0000FFFF;
  static constexpr uintmax_t third_mask = 0x00000000FFFFFFFF;
  static constexpr uintmax_t tenpow[] = {
    1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000,
    1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000,
    100000000000000, 1000000000000000, 10000000000000000, 100000000000000000,
    1000000000000000000, 10000000000000000000u,
  };
  static __attribute__((aligned(8))) char inttab[40000] = {};  // 4-digit integers (10000 many)
  template <typename Tp>
  using enable_if_integral = std::enable_if<std::is_integral<Tp>::value, Tp>;

  class scanner {
    char* pos = inbuf;
    char* endpos = inbuf + buf_size;

    void M_read_from_stdin() {
      endpos = inbuf + fread(pos, 1, buf_size, stdin);
    }
    void M_reread_from_stdin() {
      ptrdiff_t len = endpos - pos;
      if (!(inbuf + len <= pos)) return;
      memcpy(inbuf, pos, len);
      char* tmp = inbuf + len;
      endpos = tmp + fread(tmp, 1, buf_size-len, stdin);
      *endpos = 0;
      pos = inbuf;
    }

  public:
    scanner() { M_read_from_stdin(); }

    template <typename Integral,
              typename enable_if_integral<Integral>::type* = nullptr>
    void scan_parallel(Integral& x) {
      if (__builtin_expect(endpos <= pos + int_digits, 0))
        M_reread_from_stdin();
      bool ends = false;
      typename std::make_unsigned<Integral>::type y = 0;
      bool neg = false;
      if (std::is_signed<Integral>::value && *pos == '-') {
        neg = true;
        ++pos;
      }
      do {
        memcpy(minibuf, pos, 8);
        long c = *(long*)minibuf;
        long d = (c & digit_mask) ^ digit_mask;
        int skip = 8;
        int shift = 8;
        if (d) {
          int ctz = __builtin_ctzl(d);
          if (ctz == 4) break;
          c &= (1L << (ctz-5)) - 1;
          int discarded = (68-ctz) / 8;
          shift -= discarded;
          c <<= discarded * 8;
          skip -= discarded;
          ends = true;
        }
        c |= digit_mask;
        c ^= digit_mask;
        c = ((c >> 8) + c*10) & first_mask;
        c = ((c >> 16) + c*100) & second_mask;
        c = ((c >> 32) + c*10000) & third_mask;
        y = y*tenpow[shift] + c;
        pos += skip;
      } while (!ends);
      x = (neg? -y: y);
      ++pos;
    }

    template <typename Integral,
              typename enable_if_integral<Integral>::type* = nullptr>
    void scan_serial(Integral& x) {
      if (__builtin_expect(endpos <= pos + int_digits, 0))
        M_reread_from_stdin();
      bool neg = false;
      if (std::is_signed<Integral>::value && *pos == '-') {
        neg = true;
        ++pos;
      }
      typename std::make_unsigned<Integral>::type y = *pos-'0';
      while (*++pos >= '0') y = 10*y + *pos-'0';
      x = (neg? -y: y);
      ++pos;
    }

    template <typename Integral,
              typename enable_if_integral<Integral>::type* = nullptr>
    // Use scan_parallel(x) only when x may be too large (about 10^12).
    // Otherwise, even when x <= 10^9, scan_serial(x) may be faster.
    void scan(Integral& x) { scan_parallel(x); }

    void scan_serial(std::string& s) {
      // until first whitespace
      s = "";
      do {
        char* startpos = pos;
        while (*pos > ' ') ++pos;
        s += std::string(startpos, pos);
        if (*pos != 0) {
          ++pos;  // skip the space
          break;
        }
        M_reread_from_stdin();
      } while (true);
    }

    void scan(std::string& s) { scan_serial(s); }
  };

  class printer {
    char* pos = outbuf;

    void M_flush_stdout() {
      fwrite(outbuf, 1, pos-outbuf, stdout);
      pos = outbuf;
    }

    static int S_int_digits(uintmax_t n) {
      if (n >= tenpow[19]) return 20;
      if (n >= tenpow[18]) return 19;
      if (n >= tenpow[17]) return 18;
      if (n >= tenpow[16]) return 17;
      if (n >= tenpow[15]) return 16;
      if (n >= tenpow[14]) return 15;
      if (n >= tenpow[13]) return 14;
      if (n >= tenpow[12]) return 13;
      if (n >= tenpow[11]) return 12;
      if (n >= tenpow[10]) return 11;
      if (n >= tenpow[9]) return 10;
      if (n >= tenpow[8]) return 9;
      if (n >= tenpow[7]) return 8;
      if (n >= tenpow[6]) return 7;
      if (n >= tenpow[5]) return 6;
      if (n >= tenpow[4]) return 5;
      if (n >= tenpow[3]) return 4;
      if (n >= tenpow[2]) return 3;
      if (n >= tenpow[1]) return 2;
      return 1;
    }

    void M_precompute() {
      unsigned long const digit1 = 0x0200000002000000;
      unsigned long const digit2 = 0xf600fffff6010000;
      unsigned long const digit3 = 0xfff600fffff60100;
      unsigned long const digit4 = 0xfffff600fffff601;
      unsigned long counter = 0x3130303030303030;
      for (int i = 0, i4 = 0; i4 < 10; ++i4, counter += digit4)
        for (int i3 = 0; i3 < 10; ++i3, counter += digit3)
          for (int i2 = 0; i2 < 10; ++i2, counter += digit2)
            for (int i1 = 0; i1 < 5; ++i1, ++i, counter += digit1)
              *((unsigned long*)inttab + i) = counter;
    }

  public:
    printer() { M_precompute(); }
    ~printer() { M_flush_stdout(); }

    void print(char c) {
      if (__builtin_expect(pos + 1 >= outbuf + buf_size, 0)) M_flush_stdout();
      *pos++ = c;
    }

    template <size_t N>
    void print(char const(&s)[N]) {
      if (__builtin_expect(pos + N >= outbuf + buf_size, 0)) M_flush_stdout();
      memcpy(pos, s, N-1);
      pos += N-1;
    }

    void print(char const* s) {
      while (*s != 0) {
        *pos++ = *s++;
        if (pos == outbuf + buf_size) M_flush_stdout();
      }
    }

    template <typename Integral,
              typename enable_if_integral<Integral>::type* = nullptr>
    void print(Integral x) {
      if (__builtin_expect(pos + int_digits >= outbuf + buf_size, 0))
        M_flush_stdout();
      if (x == 0) {
        *pos++ = '0';
        return;
      }
      if (x < 0) {
        *pos++ = '-';
        if (__builtin_expect(x == std::numeric_limits<Integral>::min(), 0)) {
          switch (sizeof x) {
          case 2: print("32768"); return;
          case 4: print("2147483648"); return;
          case 8: print("9223372036854775808"); return;
          }
        }
        x = -x;
      }

      // char* mp = minibuf + sizeof minibuf;
      // *--mp = x % 10 + '0';
      // size_t len = 1;
      // typename std::make_unsigned<Integral>::type y = x / 10;
      // while (y > 0) {
      //   *--mp = y % 10 + '0';
      //   y /= 10;
      //   ++len;
      // }
      // memcpy(pos, mp, len);
      // pos += len;

      typename std::make_unsigned<Integral>::type y = x;
      int len = S_int_digits(y);
      pos += len;
      char* tmp = pos;
      ptrdiff_t w = pos - outbuf;
      for (int i = w % 4; i > 0; --i, --w, --len) {
        *--tmp = y % 10 + '0';
        y /= 10;
      }
      while (len >= 4) {
        tmp -= 4;
        *(unsigned*)tmp = *((unsigned*)inttab + (y % 10000));
        len -= 4;
        if (len) y /= 10000;
      }
      while (len-- > 0) {
        *--tmp = y % 10 + '0';
        y /= 10;
      }
    }

    template <typename Tp>
    void println(Tp const& x) { print(x), print('\n'); }
  };
}  // fast::

fast::scanner ebin;
fast::printer ebout;

int main(){
    const constexpr int m = int(1e6);
    int n;
    ebin.scan(n);
    vector<int> A(n);
    for (auto &a: A) ebin.scan(a);
    int g = 0;
    for (const auto &a: A)
        g = __gcd(g, a);
    
    if (g != 1){
        puts("not coprime");
        return 0;
    }

    const auto lp = get_min_prime_fact_table(m);
    vector<int> DP(m + 1);
    DP[1] = 1;
    for (int i = 2; i <= m; i++)
        DP[i] = DP[i / lp[i]] * (lp[i] == lp[i / lp[i]] ? 1 : lp[i]);
    
    vector<bool> P(m + 1);
    for (const auto &a: A){
        for (const auto &p: prime_factorize(DP[a], lp)){
            if (P[p]){
                puts("setwise coprime");
                return 0;
            }
            P[p] = true;
        }
    }

    puts("pairwise coprime");
}


Measured memory_bytes: 15136