#include <bits/stdc++.h>
using namespace std;
struct Edge {
  long long to, cap, rev;
  Edge(long long to, long long cap, long long rev)
      : to(to), cap(cap), rev(rev) {}
};
vector<Edge> G[514];
long long level[514], iter[514];
void add_edge(int from, int to, long long cap) {
  G[from].push_back(Edge(to, cap, G[to].size()));
  G[to].push_back(Edge(from, 0, G[from].size() - 1));
}
void bfs(int s) {
  memset(level, -1, sizeof(level));
  queue<int> Q;
  level[s] = 0;
  Q.push(s);
  while (!Q.empty()) {
    int v = Q.front();
    Q.pop();
    for (int i = 0; i < (int)G[v].size(); i++) {
      Edge &e = G[v][i];
      if (e.cap > 0 && level[e.to] < 0) {
        level[e.to] = level[v] + 1;
        Q.push(e.to);
      }
    }
  }
}
long long dfs(int v, int t, long long f) {
  if (v == t) return f;
  for (long long &i = iter[v]; i < (long long)G[v].size(); i++) {
    Edge &e = G[v][i];
    if (e.cap > 0 && level[v] < level[e.to]) {
      long long 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;
}
long long max_flow(int s, int t) {
  long long flow = 0;
  for (;;) {
    bfs(s);
    if (level[t] < 0) return flow;
    memset(iter, 0, sizeof(iter));
    long long f;
    while ((f = dfs(s, t, (1LL << 58))) > 0) {
      flow += f;
    }
  }
}
void init() {
  for (long long i = 0; i < 514; i++) {
    G[i].clear();
  }
}
int main() {
  map<string, int> w = {{"Monday", 0},   {"Tuesday", 1}, {"Wednesday", 2},
                        {"Thursday", 3}, {"Friday", 4},  {"Saturday", 5},
                        {"Sunday", 6}};
  long long N, W;
  while (cin >> N >> W, N) {
    init();
    long long t, c, sum = 0;
    int S = N + 7, T = S + 1;
    for (int i = 0; i < N; i++) {
      cin >> t >> c;
      sum += t;
      add_edge(S, i, t);
      for (int j = 0; j < c; j++) {
        string s;
        cin >> s;
        add_edge(i, N + w[s], (1LL << 58));
        add_edge(N + w[s], T, W);
      }
    }
    if (sum > 7 * W) {
      cout << "No" << endl;
      continue;
    }
    cout << (max_flow(S, T) >= 7 * W ? "Yes" : "No") << endl;
  }
  return 0;
}
