Language: C++

#include <cmath>
#include <iostream>
#include <string>
#include <vector> 
#include <algorithm>
#include <numeric>

#define FOR(i,a,b) for(i=(a);i<(b);++i) 
#define FORR(i,a,b) for(i=(a);i>(b);--i)
#define REP(i,n) for(i=0;i<(n);++i)
#define REPR(i,n) for(i=(n);i>0;--i)
#define PB push_back
#define ll long long
#define INT_MAX 2147483647
#define LL_MAX 9223372036854775807

using namespace std;

long long GCD(long long a, long long b) {
	if (a < b)
		swap(a, b);
	if (b == 0) return a;
	else return GCD(b, a % b);
}
bool sosuu_check(int num) {
	int i;
	for (i = 2; i <= sqrt(num); ++i) {
		if (num%i == 0)
			return false;
	}
	return (num < 2) ? false : true;
}
int main() {
	int I;
	vector<int> a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z;
	string S, T;
	char kari;
	cin >> S >> T;
	REP(I, S.size()) {
		if (S[I] == 'a')
			a.PB(I);
		else if (S[I] == 'b')
			b.PB(I);
		else if (S[I] == 'c')
			c.PB(I);
		else if (S[I] == 'd')
			d.PB(I);
		else if (S[I] == 'e')
			e.PB(I);
		else if (S[I] == 'f')
			f.PB(I);
		else if (S[I] == 'g')
			g.PB(I);
		else if (S[I] == 'h')
			h.PB(I);
		else if (S[I] == 'i')
			i.PB(I);
		else if (S[I] == 'j')
			j.PB(I);
		else if (S[I] == 'k')
			k.PB(I);
		else if (S[I] == 'l')
			l.PB(I);
		else if (S[I] == 'm')
			m.PB(I);
		else if (S[I] == 'n')
			n.PB(I);
		else if (S[I] == 'o')
			o.PB(I);
		else if (S[I] == 'p')
			p.PB(I);
		else if (S[I] == 'q')
			q.PB(I);
		else if (S[I] == 'r')
			r.PB(I);
		else if (S[I] == 's')
			s.PB(I);
		else if (S[I] == 't')
			t.PB(I);
		else if (S[I] == 'u')
			u.PB(I);
		else if (S[I] == 'v')
			v.PB(I);
		else if (S[I] == 'w')
			w.PB(I);
		else if (S[I] == 'x')
			x.PB(I);
		else if (S[I] == 'y')
			y.PB(I);
		else if (S[I] == 'z')
			z.PB(I);
	}
	if (!a.empty) {
		kari = T[a[0]];
		REP(I, a.size()) {
			if (T[a[I]] != kari) {
				cout << "No" << endl;
				return 0;
			}
		}
	}
	if (!b.empty) {
	kari = T[b[0]];
	REP(I, b.size()) {
		if (T[b[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!c.empty) {
	kari = T[c[0]];
	REP(I, c.size()) {
		if (T[c[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!d.empty) {
	kari = T[d[0]];
	REP(I, d.size()) {
		if (T[d[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!e.empty) {
	kari = T[e[0]];
	REP(I, e.size()) {
		if (T[e[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!f.empty) {
	kari = T[f[0]];
	REP(I, f.size()) {
		if (T[f[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!g.empty) {
	kari = T[g[0]];
	REP(I, g.size()) {
		if (T[g[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!h.empty) {
	kari = T[h[0]];
	REP(I, h.size()) {
		if (T[h[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!i.empty) {
	kari = T[i[0]];
	REP(I, i.size()) {
		if (T[i[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!j.empty) {
	kari = T[j[0]];
	REP(I, j.size()) {
		if (T[j[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!k.empty) {
	kari = T[k[0]];
	REP(I, k.size()) {
		if (T[k[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!l.empty) {
	kari = T[l[0]];
	REP(I, l.size()) {
		if (T[l[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!m.empty) {
	kari = T[m[0]];
	REP(I, m.size()) {
		if (T[m[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!n.empty) {
	kari = T[n[0]];
	REP(I, n.size()) {
		if (T[n[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!o.empty) {
	kari = T[o[0]];
	REP(I, o.size()) {
		if (T[o[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!p.empty) {
	kari = T[p[0]];
	REP(I, p.size()) {
		if (T[p[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!q.empty) {
	kari = T[q[0]];
	REP(I, q.size()) {
		if (T[q[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!r.empty) {
	kari = T[r[0]];
	REP(I, r.size()) {
		if (T[r[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!s.empty) {
	kari = T[s[0]];
	REP(I, s.size()) {
		if (T[s[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!t.empty) {
	kari = T[t[0]];
	REP(I, t.size()) {
		if (T[t[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!u.empty) {
	kari = T[u[0]];
	REP(I, u.size()) {
		if (T[u[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!v.empty) {
	kari = T[v[0]];
	REP(I, v.size()) {
		if (T[v[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!w.empty) {
	kari = T[w[0]];
	REP(I, w.size()) {
		if (T[w[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!x.empty) {
	kari = T[x[0]];
	REP(I, x.size()) {
		if (T[x[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}
	}
	if (!y.empty) {
	kari = T[y[0]];
	REP(I, y.size()) {
		if (T[y[I]] != kari) {
			cout << "No" << endl;
			return 0;
		}
	}

	}
	if (!z.empty) {
		kari = T[z[0]];
		REP(I, z.size()) {
			if (T[z[I]] != kari) {
				cout << "No" << endl;
				return 0;
			}
		}
	}
	cout << "Yes"<< endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:93:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
   93 |         if (!a.empty) {
      |                ^~~~~
a.cc:93:16: error: in argument to unary !
   93 |         if (!a.empty) {
      |              ~~^~~~~
a.cc:102:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  102 |         if (!b.empty) {
      |                ^~~~~
a.cc:102:16: error: in argument to unary !
  102 |         if (!b.empty) {
      |              ~~^~~~~
a.cc:111:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  111 |         if (!c.empty) {
      |                ^~~~~
a.cc:111:16: error: in argument to unary !
  111 |         if (!c.empty) {
      |              ~~^~~~~
a.cc:120:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  120 |         if (!d.empty) {
      |                ^~~~~
a.cc:120:16: error: in argument to unary !
  120 |         if (!d.empty) {
      |              ~~^~~~~
a.cc:129:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  129 |         if (!e.empty) {
      |                ^~~~~
a.cc:129:16: error: in argument to unary !
  129 |         if (!e.empty) {
      |              ~~^~~~~
a.cc:138:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  138 |         if (!f.empty) {
      |                ^~~~~
a.cc:138:16: error: in argument to unary !
  138 |         if (!f.empty) {
      |              ~~^~~~~
a.cc:147:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  147 |         if (!g.empty) {
      |                ^~~~~
a.cc:147:16: error: in argument to unary !
  147 |         if (!g.empty) {
      |              ~~^~~~~
a.cc:156:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  156 |         if (!h.empty) {
      |                ^~~~~
a.cc:156:16: error: in argument to unary !
  156 |         if (!h.empty) {
      |              ~~^~~~~
a.cc:165:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  165 |         if (!i.empty) {
      |                ^~~~~
a.cc:165:16: error: in argument to unary !
  165 |         if (!i.empty) {
      |              ~~^~~~~
a.cc:174:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  174 |         if (!j.empty) {
      |                ^~~~~
a.cc:174:16: error: in argument to unary !
  174 |         if (!j.empty) {
      |              ~~^~~~~
a.cc:183:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  183 |         if (!k.empty) {
      |                ^~~~~
a.cc:183:16: error: in argument to unary !
  183 |         if (!k.empty) {
      |              ~~^~~~~
a.cc:192:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  192 |         if (!l.empty) {
      |                ^~~~~
a.cc:192:16: error: in argument to unary !
  192 |         if (!l.empty) {
      |              ~~^~~~~
a.cc:201:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  201 |         if (!m.empty) {
      |                ^~~~~
a.cc:201:16: error: in argument to unary !
  201 |         if (!m.empty) {
      |              ~~^~~~~
a.cc:210:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  210 |         if (!n.empty) {
      |                ^~~~~
a.cc:210:16: error: in argument to unary !
  210 |         if (!n.empty) {
      |              ~~^~~~~
a.cc:219:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  219 |         if (!o.empty) {
      |                ^~~~~
a.cc:219:16: error: in argument to unary !
  219 |         if (!o.empty) {
      |              ~~^~~~~
a.cc:228:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  228 |         if (!p.empty) {
      |                ^~~~~
a.cc:228:16: error: in argument to unary !
  228 |         if (!p.empty) {
      |              ~~^~~~~
a.cc:237:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  237 |         if (!q.empty) {
      |                ^~~~~
a.cc:237:16: error: in argument to unary !
  237 |         if (!q.empty) {
      |              ~~^~~~~
a.cc:246:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  246 |         if (!r.empty) {
      |                ^~~~~
a.cc:246:16: error: in argument to unary !
  246 |         if (!r.empty) {
      |              ~~^~~~~
a.cc:255:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  255 |         if (!s.empty) {
      |                ^~~~~
a.cc:255:16: error: in argument to unary !
  255 |         if (!s.empty) {
      |              ~~^~~~~
a.cc:264:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  264 |         if (!t.empty) {
      |                ^~~~~
a.cc:264:16: error: in argument to unary !
  264 |         if (!t.empty) {
      |              ~~^~~~~
a.cc:273:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  273 |         if (!u.empty) {
      |                ^~~~~
a.cc:273:16: error: in argument to unary !
  273 |         if (!u.empty) {
      |              ~~^~~~~
a.cc:282:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  282 |         if (!v.empty) {
      |                ^~~~~
a.cc:282:16: error: in argument to unary !
  282 |         if (!v.empty) {
      |              ~~^~~~~
a.cc:291:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  291 |         if (!w.empty) {
      |                ^~~~~
a.cc:291:16: error: in argument to unary !
  291 |         if (!w.empty) {
      |              ~~^~~~~
a.cc:300:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  300 |         if (!x.empty) {
      |                ^~~~~
a.cc:300:16: error: in argument to unary !
  300 |         if (!x.empty) {
      |              ~~^~~~~
a.cc:309:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  309 |         if (!y.empty) {
      |                ^~~~~
a.cc:309:16: error: in argument to unary !
  309 |         if (!y.empty) {
      |              ~~^~~~~
a.cc:319:16: error: cannot convert 'std::vector<int>::empty' from type 'bool (std::vector<int>::)() const noexcept' to type 'bool'
  319 |         if (!z.empty) {
      |                ^~~~~
a.cc:319:16: error: in argument to unary !
  319 |         if (!z.empty) {
      |              ~~^~~~~