#include <bits/stdc++.h>
const double PI = acos(-1);
const double EPS = 1e-10;
const int inf = 1e9;
using namespace std;
struct edge {
  int to, cap, rev;
};
vector<vector<edge> > G(200);
vector<bool> used(200);
void add_edge(int from, int to, int cap) {
  edge q = {to, cap, int(G[to].size())};
  G[from].push_back(q);
  q = {from, 0, int(G[from].size() - 1)};
  G[to].push_back(q);
}
int dfs(int v, int t, int f) {
  if (v == t) return f;
  used[v] = 1;
  for (int i = 0; i < G[v].size(); i++) {
    edge &e = G[v][i];
    if (used[e.to] || e.cap <= 0) continue;
    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 ford_fulkerson(int s, int t) {
  int flow = 0, f;
  while (1) {
    used = vector<bool>(200, false);
    f = dfs(s, t, inf);
    if (f == 0) return flow;
    flow += f;
  }
}
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long n, m;
  map<string, int> ma;
  ma["Sunday"] = 0;
  ma["Monday"] = 1;
  ma["Tuesday"] = 2;
  ma["Wednesday"] = 3;
  ma["Thursday"] = 4;
  ma["Friday"] = 5;
  ma["Saturday"] = 6;
  while (cin >> n >> m, n + m) {
    for (int i = 0; i < 200; i++) G[i].clear();
    used = vector<bool>(200, false);
    int s = n + 7, t = s + 1;
    int out = 0;
    for (int i = 0; i < n; i++) {
      int c, d;
      cin >> c >> d;
      out += c;
      add_edge(s, i, c);
      for (int j = 0; j < d; j++) {
        string s;
        cin >> s;
        add_edge(i, n + ma[s], m);
      }
    }
    for (int i = 0; i < 7; i++) add_edge(n + i, t, m);
    if (ford_fulkerson(s, t) == out)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
