#include <bits/stdc++.h>
using namespace std;
struct edge {
  int to, rev;
  long long cap;
};
vector<vector<edge> > G(110);
bool used[110];
void addEdge(int from, int to, long long cap) {
  G[from].push_back((edge){to, (int)G[to].size(), cap});
  G[to].push_back((edge){from, (int)G[from].size() - 1, 0});
}
long long dfs(int v, int t, long long f) {
  if (v == t) return f;
  used[v] = true;
  for (int i = 0; i < G[v].size(); i++) {
    edge &e = G[v][i];
    if (!used[e.to] && e.cap > 0) {
      int d = dfs(e.to, t, min(f, e.cap));
      if (d > 0) {
        e.cap -= d;
        G[e.to][e.rev].cap += d;
        return d;
      }
    }
  }
  return 0;
}
int maxFlow(int s, int t) {
  int flow = 0;
  for (;;) {
    memset(used, false, sizeof(used));
    long long f = dfs(s, t, (1LL << 55));
    if (f == 0) return flow;
    flow += f;
  }
}
int main() {
  map<string, int> days = {{"Sunday", 0},    {"Monday", 1},   {"Tuesday", 2},
                           {"Wednesday", 3}, {"Thursday", 4}, {"Friday", 5},
                           {"Saturday", 6}};
  long long N, W;
  while (cin >> N >> W, N || W) {
    G.clear();
    G.resize(N + 9);
    int S = N + 7, T = S + 1;
    long long lesson = 0;
    for (int i = 0; i < N; i++) {
      long long t;
      int c;
      cin >> t >> c;
      lesson += t;
      addEdge(S, i, t);
      for (int j = 0; j < c; j++) {
        string day;
        cin >> day;
        addEdge(i, N + days[day], (1LL << 55));
      }
    }
    for (int i = 0; i < 7; i++) {
      addEdge(N + i, T, W);
    }
    cout << (maxFlow(S, T) >= lesson ? "Yes" : "No") << endl;
  }
  return 0;
}
