#include <bits/stdc++.h>
using namespace std;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
struct UnionFind {
  vector<int> v;
  UnionFind(int n) : v(n) {
    for (int i = 0; i < n; i++) v[i] = i;
  }
  int find(int x) { return v[x] == x ? x : v[x] = find(v[x]); }
  void unite(int x, int y) { v[find(x)] = find(y); }
};
int s1[26], s2[26], t1[26];
int main() {
  string s, t;
  cin >> s >> t;
  for (int i = 0; i < (int)(s.length()); ++i)
    if (i % 2 == 0)
      s1[s[i] - 'a']++;
    else
      s2[s[i] - 'a']++;
  for (int i = 0; i < (int)(t.length()); ++i) t1[t[i] - 'a']++;
  bool clear1 = true;
  bool clear2 = true;
  for (int i = 0; i < (int)(26); ++i) {
    if (t1[i] < s1[i]) clear1 = false;
    if (t1[i] < s2[i]) clear2 = false;
  }
  if (clear1 || clear2)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
