#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 100;
const int MAX_GN = MAX_N + 9;

const long long LLINF = 1LL << 62;

const string wdnames[] = {
  "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
};

/* typedef */

typedef long long ll;

struct Edge {
  int ui, vi;
  ll c;
  Edge(int _ui, int _vi, ll _c): ui(_ui), vi(_vi), c(_c) {}
};

typedef vector<Edge> ve;

/* global variables */

int n, gn, st, gl;
ll w, sumti;
map<string,int> wdnhash;
ve nbrs[MAX_GN];
ll minfs[MAX_GN], flows[MAX_GN][MAX_GN];
int prvs[MAX_GN];

/* subroutines */

/* main */

int main() {
  for (int i = 0; i < 7; i++) wdnhash[wdnames[i]] = i;

  for (;;) {
    cin >> n >> w;
    if (n == 0) break;

    gn = n + 9;
    st = n + 7;
    gl = n + 8;

    for (int i = 0; i < gn; i++) nbrs[i].clear();
    sumti = 0;
    
    for (int i = 0; i < n; i++) {
      ll ti;
      int ci;
      cin >> ti >> ci;

      sumti += ti;
      nbrs[st].push_back(Edge(st, i, ti));

      for (int j = 0; j < ci; j++) {
	string wdname;
	cin >> wdname;
	int wj = n + wdnhash[wdname];

	nbrs[i].push_back(Edge(i, wj, LLINF));
	nbrs[wj].push_back(Edge(wj, i, 0));
      }
    }

    for (int i = 0; i < 7; i++)
      nbrs[n + i].push_back(Edge(n + i, gl, w));

    memset(flows, 0, sizeof(flows));
    ll max_flow = 0;

    for (;;) {
      //printf("max_flow = %lld\n", max_flow);

      memset(prvs, -1, sizeof(prvs));
      prvs[st] = st;
      minfs[st] = LLINF;

      queue<int> q;
      q.push(st);

      while (! q.empty()) {
	int ui = q.front(); q.pop();

	if (ui == gl) break;

	ve& nbru = nbrs[ui];
	for (ve::iterator vit = nbru.begin(); vit != nbru.end(); vit++) {
	  int vi = vit->vi;
	  ll vc = vit->c - flows[ui][vi];
	  if (prvs[vi] < 0 && vc > 0) {
	    prvs[vi] = ui;
	    minfs[vi] = (minfs[ui] < vc) ? minfs[ui] : vc;
	    q.push(vi);
	  }
	}
      }

      if (prvs[gl] < 0) break;
      ll min_flow = minfs[gl];

      for (int j = gl; j != st;) {
	int i = prvs[j];
	flows[i][j] += min_flow;
	flows[j][i] -= min_flow;
	j = i;
      }

      max_flow += min_flow;
    }

    cout << (max_flow >= sumti ? "Yes" : "No") << endl;
  }

  return 0;
}