Language: C++

#include <iostream>
#include <map>
#include <iomanip>
#include <cmath>
#include <algorithm>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
template<class T> inline void chmin(T& a, T b) {if (a>b) a=b; }
template<class T> inline void chmax(T& a, T b) {if (a<b) a=b; }
inline void print() { cout << endl; }
template <class Head, class... Tail> inline void print(Head&& head, Tail&&... tail) {cout << head; if (sizeof...(tail) != 0) cout << " "; print(forward<Tail>(tail)...);}
template <class T> inline void print(vector<T>& vec) { for (auto& a : vec) {cout << a; if (&a != &vec.back()) cout << " "; } cout << endl;}
template <class T> inline void print(vector<vector<T>>& df) { for (auto& vec : df) { print(vec); }}
typedef long long ll;
const ll LINF = 1e18;
const int INF = 1e9;


int main() { 
    string S, T; cin >> S >> T;
    map<char, char> st;
    map<char, char> ts;

    REP(i, S.size()) {
        REP(j, T.size()) {
            char x = S[i];
            char y = T[i];
            if (st.count(x) == 0) {
                st[x] = y;
            } else {
                if (st[x] != y) {
                    print("No");
                    return 0;
                }
            }
            if (ts.count(y) == 0) {
                ts[y] = x;
            } else {
                if (ts[y] != x) {
                    print("No");
                    return 0;
                }
            }
        }
    }

    print("Yes");

    return 0;
}

Compiler output:
a.cc:12:32: error: variable or field 'print' declared void
   12 | template <class T> inline void print(vector<T>& vec) { for (auto& a : vec) {cout << a; if (&a != &vec.back()) cout << " "; } cout << endl;}
      |                                ^~~~~
a.cc:12:38: error: 'vector' was not declared in this scope
   12 | template <class T> inline void print(vector<T>& vec) { for (auto& a : vec) {cout << a; if (&a != &vec.back()) cout << " "; } cout << endl;}
      |                                      ^~~~~~
a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    5 | #include <algorithm>
  +++ |+#include <vector>
    6 | using namespace std;
a.cc:12:46: error: expected primary-expression before '>' token
   12 | template <class T> inline void print(vector<T>& vec) { for (auto& a : vec) {cout << a; if (&a != &vec.back()) cout << " "; } cout << endl;}
      |                                              ^
a.cc:12:49: error: 'vec' was not declared in this scope
   12 | template <class T> inline void print(vector<T>& vec) { for (auto& a : vec) {cout << a; if (&a != &vec.back()) cout << " "; } cout << endl;}
      |                                                 ^~~
a.cc:13:32: error: variable or field 'print' declared void
   13 | template <class T> inline void print(vector<vector<T>>& df) { for (auto& vec : df) { print(vec); }}
      |                                ^~~~~
a.cc:13:38: error: 'vector' was not declared in this scope
   13 | template <class T> inline void print(vector<vector<T>>& df) { for (auto& vec : df) { print(vec); }}
      |                                      ^~~~~~
a.cc:13:38: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:13:45: error: 'vector' was not declared in this scope
   13 | template <class T> inline void print(vector<vector<T>>& df) { for (auto& vec : df) { print(vec); }}
      |                                             ^~~~~~
a.cc:13:45: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:13:53: error: expected primary-expression before '>>' token
   13 | template <class T> inline void print(vector<vector<T>>& df) { for (auto& vec : df) { print(vec); }}
      |                                                     ^~
a.cc:13:57: error: 'df' was not declared in this scope
   13 | template <class T> inline void print(vector<vector<T>>& df) { for (auto& vec : df) { print(vec); }}
      |                                                         ^~