Language: C++

#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int65_t gcd(int64_t a, int64_t b) {
    if (a % b == 1)
        return (b);
    return (gcd(b, a % b));
}

int main(void) {
    int65_t N;
    cin >> N;
    vector<int65_t> A(N);
    int65_t maxA = 0;
    for (int65_t i = 0; i < N; ++i)
    {
        cin >> A[i];
        if (A[i] > maxA)
            maxA = A[i];
    }
    vector<int64_t> D(maxA + 1);
    vector<int64_t> primes;
    for (int64_t i = 2; i <= maxA; ++i)
    {
        int64_t can_div = i;
        for (auto p : primes)
        {
            if (p * p > i) {
                break;
            }
            if (i % p == 0)
            {
                can_div = p;
                break;
            }
        }
        if (can_div == i) {
            primes.push_back(i);
        }
        D[i] = can_div;
    }

    vector<int64_t> seen(maxA + 1, -1);
    bool will_continue = true;
    for (auto a : A)
    {
        if (will_continue == false)
            break;

        auto origA = a;
        while (a >= 2)
        {
            auto p = D[a];
            if (seen[p] != -1 && seen[p] != origA)
            {
                will_continue = false;
                break;
            }
            seen[p] = origA;
            a /= p;
        }
    }
    if (will_continue)
    {
        cout << "pairwise coprime" << endl;
        return 0;
    }

    int64_t gcd_ret = A[0];
    for(int64_t i=1; i<N; ++i) {
        gcd_ret = gcd(gcd_ret, A[i]);
    }

    if(gcd_ret == 1) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }

    return 0;
}

Compiler output:
a.cc:7:1: error: 'int65_t' does not name a type; did you mean 'int64_t'?
    7 | int65_t gcd(int64_t a, int64_t b) {
      | ^~~~~~~
      | int64_t
a.cc: In function 'int main()':
a.cc:14:5: error: 'int65_t' was not declared in this scope; did you mean 'int64_t'?
   14 |     int65_t N;
      |     ^~~~~~~
      |     int64_t
a.cc:15:12: error: 'N' was not declared in this scope
   15 |     cin >> N;
      |            ^
a.cc:16:19: error: template argument 2 is invalid
   16 |     vector<int65_t> A(N);
      |                   ^
a.cc:17:12: error: expected ';' before 'maxA'
   17 |     int65_t maxA = 0;
      |            ^~~~~
      |            ;
a.cc:18:17: error: expected ';' before 'i'
   18 |     for (int65_t i = 0; i < N; ++i)
      |                 ^~
      |                 ;
a.cc:18:25: error: 'i' was not declared in this scope
   18 |     for (int65_t i = 0; i < N; ++i)
      |                         ^
a.cc:21:20: error: 'maxA' was not declared in this scope
   21 |         if (A[i] > maxA)
      |                    ^~~~
a.cc:24:23: error: 'maxA' was not declared in this scope
   24 |     vector<int64_t> D(maxA + 1);
      |                       ^~~~
a.cc:48:19: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
   48 |     for (auto a : A)
      |                   ^
      |                   std::begin
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
a.cc:48:19: error: 'end' was not declared in this scope; did you mean 'std::end'?
   48 |     for (auto a : A)
      |                   ^
      |                   std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
a.cc:72:24: error: invalid types 'int[int]' for array subscript
   72 |     int64_t gcd_ret = A[0];
      |                        ^
a.cc:74:33: error: invalid types 'int[int64_t {aka long int}]' for array subscript
   74 |         gcd_ret = gcd(gcd_ret, A[i]);
      |                                 ^
a.cc:74:19: error: 'gcd' was not declared in this scope
   74 |         gcd_ret = gcd(gcd_ret, A[i]);
      |                   ^~~