#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
struct edge{ int to,rev; ll cap; };
vector< vector<edge> > G(110);
bool used[110];

#define INF (1LL << 55)

void addEdge(int from, int to, ll cap)
{
  G[from].push_back((edge){to, (int)G[to].size(), cap});
  G[to].push_back((edge){from, (int)G[from].size()-1, 0});
}

ll dfs(int v, int t, ll f)
{
  if(v == t) return f;
  used[v] = true;
  for(int i = 0; i < G[v].size(); i++){
    edge &e = G[v][i];
    if(!used[e.to] && e.cap > 0){
      ll 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;
}

ll maxFlow(int s, int t)
{
  ll flow = 0;
  for(;;){
    memset(used, false, sizeof(used));
    ll f = dfs(s, t, INF);
    if(f == 0) return flow;
    flow += f;
  }
}

int main()
{
  map<string, int> days = {
    {"Sunday",0},
    {"Monday",1},
    {"Tuesday",2},
    {"Wednesday",3},
    {"Thursday",4},
    {"Friday",5},
    {"Saturday",6}
  };
  ll N, W;
  while(cin >> N >> W, N || W){
    G.clear(); G.resize(N + 9);
    int S = N + 7, T = S + 1;
    ll lesson = 0;
    for(int i = 0; i < N; i++){
      ll t; int c;
      cin >> t >> c;
      lesson += t;
      addEdge(S, i, t);
      for(int j = 0; j < c; j++){
	string day;
	cin >> day;
	addEdge(i, N + days[day], INF);
      }
    }
    for(int i = 0; i < 7; i++){
      addEdge(N + i, T, W);      
    }
    cout << (maxFlow(S, T) >= lesson ? "Yes":"No") << endl;
  }
  return 0;
}