#include <bits/stdc++.h>
using namespace std;
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"};
struct Edge {
  int ui, vi;
  long long c;
  Edge(int _ui, int _vi, long long _c) : ui(_ui), vi(_vi), c(_c) {}
};
int n, gn, st, gl;
long long w, sumti;
map<string, int> wdnhash;
vector<Edge> nbrs[MAX_GN];
long long minfs[MAX_GN], flows[MAX_GN][MAX_GN];
int prvs[MAX_GN];
int main() {
  for (int i = 0; i < 7; i++) wdnhash[wdnames[i]] = i;
  for (;;) {
    cin >> n >> w;
    if (n == 0) break;
    gn = n;
    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++) {
      long long 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));
    long long max_flow = 0;
    for (;;) {
      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;
        vector<Edge>& nbru = nbrs[ui];
        for (vector<Edge>::iterator vit = nbru.begin(); vit != nbru.end();
             vit++) {
          int vi = vit->vi;
          long long 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;
      long long 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;
}
