#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
const int MAX_V = 500;
int V;
int N;
long long W;
string name[7] = {"Sunday",   "Monday", "Tuesday", "Wednesday",
                  "Thursday", "Friday", "Saturday"};
struct Edge {
  int src, dst;
  long long weight;
  int rev;
  Edge(int f, int t, long long c, int rev = 0)
      : src(f), dst(t), weight(c), rev(rev) {}
};
struct Node : public vector<Edge> {};
bool operator<(const Edge &a, const Edge &b) { return a.weight < b.weight; }
bool operator>(const Edge &a, const Edge &b) { return b < a; }
void add_edge(vector<Node> &G, int s, int t, int cap) {
  G[s].push_back(Edge(s, t, cap, G[t].size() - 1));
  G[t].push_back(Edge(t, s, 0, G[s].size()));
}
void bfs(const vector<Node> &G, vector<int> &level, int s) {
  level[s] = 0;
  queue<int> que;
  que.push(s);
  while (!que.empty()) {
    int v = que.front();
    que.pop();
    for (int i = 0; i < (int)G[v].size(); i++) {
      const Edge &e = G[v][i];
      if (e.weight > 0 && level[e.dst] < 0) {
        level[e.dst] = level[v] + 1;
        que.push(e.dst);
      }
    }
  }
}
long long dfs(vector<Node> &G, vector<int> &level, vector<int> &iter, int v,
              int t, long long flow) {
  if (v == t) return flow;
  for (int &i = iter[v]; i < (int)G[v].size(); i++) {
    Edge &e = G[v][i];
    if (e.weight > 0 && level[v] < level[e.dst]) {
      long long d = dfs(G, level, iter, e.dst, t, min(flow, e.weight));
      if (d > 0) {
        e.weight -= d;
        G[e.dst][e.rev].weight += d;
        return d;
      }
    }
  }
  return 0;
}
long long max_flow(vector<Node> &G, int s, int t) {
  long long flow = 0;
  while (true) {
    vector<int> level(G.size(), -1);
    vector<int> iter(G.size(), 0);
    bfs(G, level, s);
    if (level[t] < 0) break;
    long long f = 0;
    while ((f = dfs(G, level, iter, s, t, INF)) > 0) {
      flow += f;
    }
  }
  return flow;
}
inline int string2int(const string &a) {
  return find(name, name + 7, a) - name;
}
int main() {
  while (cin >> N >> W) {
    vector<Node> G(N + 10);
    if (N == 0) break;
    int s = N + 7;
    int e = N + 7 + 1;
    long long req = 0;
    V = N + 7 + 2;
    for (int i = 0; i < N; i++) {
      long long c, t;
      cin >> t >> c;
      add_edge(G, s, i, t);
      req += t;
      for (int j = 0; j < c; j++) {
        string k;
        cin >> k;
        add_edge(G, i, string2int(k) + N, t);
      }
    }
    for (int i = 0; i < 7; i++) {
      add_edge(G, N + i, e, W);
    }
    long long flow = max_flow(G, s, e);
    if (flow == req) {
      cout << "Yes" << endl;
      ;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
