#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const double EPS = 1e-10;
struct edge {
  int to;
  long long cap;
  int rev;
  edge(){};
  edge(int to, int cap, int rev) {
    this->to = to;
    this->cap = cap;
    this->rev = rev;
  }
};
vector<edge> G[200];
int level[200];
int iter[200];
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));
  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++) {
      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 < (int)G[v].size(); i++) {
    edge &e = G[v][i];
    if (e.cap > 0 && level[e.to] > level[v]) {
      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, f;
  while (true) {
    bfs(s);
    if (level[t] < 0) break;
    memset(iter, 0, sizeof(iter));
    while ((f = dfs(s, t, 1LL << 50)) > 0) flow += f;
  }
  return flow;
}
string days[] = {
    "Monday", "Tuesday",  "Wednesday", "Thursday",
    "Friday", "Saturday", "Sunday",
};
int main() {
  int N, c;
  long long W, need;
  string str;
  while (cin >> N >> W && (N || W)) {
    for (int i = 0; i < 200; i++) G[i].clear();
    long long sum = 0;
    int s = 7 + N;
    int t = s + 1;
    for (int i = 0; i < 7; i++) add_edge(s, i, W);
    for (int i = 0; i < N; i++) {
      cin >> need >> c;
      sum += need;
      add_edge(7 + i, t, need);
      for (int j = 0; j < c; j++) {
        cin >> str;
        for (int k = 0; k < 7; k++)
          if (days[k] == str) add_edge(k, 7 + i, W);
      }
    }
    long long num = max_flow(s, t);
    if (num == sum)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
