← Home
#include <bits/stdc++.h>
using namespace std;
 
#ifdef ENDEAVOUR
#include "debug.h"
#else
#define debug(...)
#define debugArr(...)
#endif
 
int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int n;
	cin >> n;
	long long t;
	cin >> t;
	string s;
	cin >> s;
	// so the problem is to just check if we can make the number t
	// by dividing the set {s[0], s[1], ..., s[n - 1]} into two sets
	// s.t. the first set will get added and another one will get subtracted
	// and that way can we make the number t?
 
	// also one thing is that we can only add s[n - 1]
	// and we can only subtract s[n - 2]
	// for other numbers we can do anything
 
	t -= 1ll << (int)(s[n - 1] - 'a');
	t += 1ll << (int)(s[n - 2] - 'a');
	// now it is just trivial
	// we'll just count all the number of occurences of all the 2's powers
	// and then go from the lowest bit in t to the highest
	// use if that bit is needed or push the remaining above to use them for
	// higher bits
	vector<int> cnt(60);
	for (int i = 0; i < n - 2; i++) {
		t += 1ll << (int)(s[i] - 'a');
		cnt[(int)(s[i] - 'a' + 1)]++;
	}
	// what we did above is that we first added everything so that t
	// will now become positive
	// and when we intend to subtract something we'll subtract it two times
	// as if we were subtracting it from the original t one time
	// finally we want t to become 0
	auto ok = [&]() -> bool {
		if (t < 0) return false;
		for (int i = 0; t > 0; i++) {
			if (t & 1) {
				if (cnt[i] == 0) return false;
				cnt[i]--;
				t--;
			}
			t >>= 1;
			cnt[i + 1] += cnt[i] / 2;
		} return true;
	};
	cout << (ok() ? "Yes" : "No");
	return 0;
}