#include <cstdio>
#include <cstring>
#include <vector>
#include <string>
#include <set>
#include <iostream>
#include <algorithm>
#include <cassert>

using namespace std;

const int N = 1000 + 10;

int n;
long long w;

int convert(char *x)
{
	if (x[0] == 'S') {
		if (x[1] == 'u') return 0;
		return 6;
	} else if (x[0] == 'T') {
		if (x[1] == 'u') return 2;
		return 4;
	} else if (x[0] == 'M') {
		return 1;
	} else if (x[0] == 'W') {
		return 3;
	}
	return 5;
	assert(0);
}

void read(long long &x)
{
	char ch;
	for(ch = getchar(); ch < '0' || ch > '9'; ch = getchar());
	for(x = 0; ch >= '0' && ch <= '9'; ch = getchar())
		x = x * 10 + ch - '0';
}

int id[N];
long long a[N];
int s[N];

void solve()
{
	int cnt;
	char buf[10];
	for(int i = 0; i < n; ++ i) {
		read(a[i]);
		scanf("%d", &cnt);
		s[i] = 0;

		for( ; cnt --; ) {
			scanf("%s", buf);
			int x = convert(buf);
			s[i] |= (1 << x);
		}
	}
	int flag = true;
	for(int t = 0; t < (1 << 7); ++ t) {
		long long tmp = 0;
		for(int i = 0; i < n; ++ i) {
			if ((s[i] | t) == t) {
				tmp += a[i];
			}
		}
		int x = 0;
		for(int tmp = t; tmp; tmp -= tmp & -tmp)
			++ x;
		if (tmp > x * w) {
			flag = false;
			break;
		}
	}
	cout << (flag ? "Yes" : "No") << endl;
}

int main()
{
	for( ; cin >> n >> w && (n || w); ) {
		solve();
	}
	return 0;
}