#include <bits/stdc++.h>
using namespace std;
const int MAX_V = 1001;
const long long INF = 1000000000000000LL;
class edge {
 public:
  int to, rev;
  long long cap;
  edge(int to_, long long cap_, int rev_) {
    to = to_;
    cap = cap_;
    rev = rev_;
  }
};
vector<edge> G[MAX_V];
int level[MAX_V];
int iter[MAX_V];
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> que;
  level[s] = 0;
  que.push(s);
  while (!que.empty()) {
    int v = que.front();
    que.pop();
    for (int i = 0; i < G[v].size(); i++) {
      edge &e = G[v][i];
      if (e.cap > 0 && level[e.to] < 0) {
        level[e.to] = level[v] + 1;
        que.push(e.to);
      }
    }
  }
}
long long dfs(int v, int t, long long f) {
  if (v == t) return f;
  for (int &i = iter[v]; i < 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;
  while (1) {
    bfs(s);
    if (level[t] < 0) return flow;
    memset(iter, 0, sizeof(iter));
    long long f;
    while ((f = dfs(s, t, INF)) > 0) flow += f;
  }
}
int N;
long long W;
int ts[101];
int cs[101];
int main() {
  while (cin >> N >> W && (N | W)) {
    long long sum = 0;
    for (int i = 0; i < MAX_V; i++) G[i].clear();
    int sn, gn;
    for (int i = 0; i < N; i++) {
      cin >> ts[i] >> cs[i];
      sum += ts[i];
      for (int j = 0; j < cs[i]; j++) {
        string s;
        cin >> s;
        int id = 0;
        if (s == "Monday")
          id = 0;
        else if (s == "Tuesday")
          id = 1;
        else if (s == "Wednesday")
          id = 2;
        else if (s == "Thursday")
          id = 3;
        else if (s == "Friday")
          id = 4;
        else if (s == "Saturday")
          id = 5;
        else
          id = 6;
        add_edge(id, 7 + i, INF);
      }
    }
    sn = N + 7;
    gn = sn + 1;
    for (int i = 0; i < 7; i++) add_edge(sn, i, W);
    for (int i = 0; i < N; i++) add_edge(7 + i, gn, ts[i]);
    int res = max_flow(sn, gn);
    if (res == sum)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
