#include <bits/stdc++.h>
using namespace std;
static const long long INF = 1000000000000000ll;
struct dinic {
  struct edge {
    int to;
    long long cost;
  };
  int n;
  vector<vector<edge> > G;
  vector<vector<long long> > flow, capacity;
  vector<int> level;
  vector<bool> used;
  dinic(int _n) {
    n = _n;
    G.resize(n);
    flow.resize(n);
    for (long long i = 0; i < n; ++i) flow[i] = vector<long long>(n);
    capacity.resize(n);
    for (long long i = 0; i < n; ++i) capacity[i] = vector<long long>(n);
    level.resize(n);
    used.resize(n);
  }
  void add_edge(int from, int to, int cost) {
    G[from].push_back((edge){to, cost});
  }
  long long dfs(int s, int t, long long cur) {
    if (s == t || cur == 0) return cur;
    if (used[s]) return 0;
    used[s] = true;
    for (long long i = 0; i < G[s].size(); ++i) {
      edge e = G[s][i];
      if (level[e.to] > level[s]) {
        long long f = dfs(e.to, t, min(cur, capacity[s][e.to] - flow[s][e.to]));
        if (f > 0) {
          flow[s][e.to] += f;
          flow[e.to][s] -= f;
          used[s] = false;
          return f;
        }
      }
    }
    return 0;
  }
  long long calc(int s, int t) {
    for (long long i = 0; i < n; ++i)
      for (long long j = 0; j < n; ++j) flow[i][j] = capacity[i][j] = 0;
    for (long long i = 0; i < n; ++i)
      for (long long j = 0; j < G[i].size(); ++j) {
        edge e = G[i][j];
        capacity[i][e.to] += e.cost;
      }
    long long total = 0;
    while (true) {
      for (long long i = 0; i < n; ++i) level[i] = -1;
      level[s] = 0;
      queue<int> Q;
      Q.push(s);
      int d = n;
      while (!Q.empty() && level[Q.front()] < d) {
        int u = Q.front();
        Q.pop();
        if (u == t) d = level[u];
        for (long long i = 0; i < G[u].size(); ++i) {
          edge e = G[u][i];
          if (capacity[u][e.to] - flow[u][e.to] > 0 && level[e.to] == -1) {
            Q.push(e.to);
            level[e.to] = level[u] + 1;
          }
        }
      }
      for (long long i = 0; i < n; ++i) used[i] = false;
      bool flag = false;
      while (true) {
        long long f = dfs(s, t, INF);
        if (f == 0) break;
        total += f;
        flag = true;
      }
      if (!flag) break;
    }
    return total;
  }
};
int main() {
  map<string, int> mp;
  mp["Monday"] = 0;
  mp["Tuesday"] = 1;
  mp["Wednesday"] = 2;
  mp["Thursday"] = 3;
  mp["Friday"] = 4;
  mp["Saturday"] = 5;
  mp["Sunday"] = 6;
  while (true) {
    int n;
    long long w;
    cin >> n >> w;
    if (!n) break;
    dinic D(1 + 7 + n + 1);
    int src = n;
    int dst = n + 1;
    int week[7];
    for (long long i = 0; i < 7; ++i) {
      week[i] = n + 2 + i;
      D.add_edge(src, week[i], w);
    }
    long long sum = 0;
    for (long long i = 0; i < n; ++i) {
      long long t;
      int c;
      cin >> t >> c;
      sum += t;
      for (long long j = 0; j < c; ++j) {
        string s;
        cin >> s;
        int d = mp[s];
        D.add_edge(week[d], i, t);
      }
      D.add_edge(i, dst, t);
    }
    long long flow = D.calc(src, dst);
    if (flow == sum) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
