#include <algorithm>
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
#include <map>
#define MAX_N 100
#define MAX_W 10000000000
#define INF 1 << 30
using namespace std;

struct edge {
    int to, cap, rev;
};

int N,W;
int T[MAX_N];
int C[MAX_N];
bool can[MAX_N][7];

static std::vector<edge> G[MAX_N];
static bool used[MAX_N];

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


int dfs(int v, int t,  int f) {
    if (v == t) {
        return f;
    }

    used[v] = true;

    for (unsigned int i = 0; i < G[v].size(); i++) {
        edge& e = G[v][i];
        if (!used[e.to] && e.cap > 0) {
            int d = dfs(e.to, t, std::min(f, e.cap));
            if (0 < d) {
                e.cap -= d;
                G[e.to][e.rev].cap += d;
                return d;
            }
        }
    }

    return 0;
}


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

}

int main(void) {
    std::map<std::string, int> map_weekday_num;
    map_weekday_num["Sunday"] = 0;
    map_weekday_num["Monday"] = 1;
    map_weekday_num["Tuesday"] = 2;
    map_weekday_num["Wednesday"] = 3;
    map_weekday_num["Thursday"] = 4;
    map_weekday_num["Friday"] = 5;
    map_weekday_num["Saturday"] = 6;

    while(1){
      std::cin >> N >> W;
      if((N|W) == 0){
	break;
      }
      for(int i = 0; i < MAX_N; ++i){
	for(int j = 0; j < 7; ++j){
	  can[i][j] = false;
	}
      }
      for(int i = 0; i < N; ++i){
	std::cin >> T[i] >> C[i];
	for(int j = 0; j < C[i]; ++j){
	  std::string tmp;
	  cin >> tmp;
	  can[i][map_weekday_num[tmp]] = true;
	}
      }
      
      int s = N;
      int t = s+1;
      
      for(int i = 0; i < N; i++){
	add_edge(s, i,T[i]);
      }
      for(int i = 0; i < 7; i++){
	add_edge(N+i,t,W);
      }
      for(int i = 0; i < N; i++){
	for(int j = 0; j < 7; j++){
	  if(can[i][j]){
	    add_edge(i,N+j,T[i]);
	  }
	}
      }
      int sum = 0;
      for(int i = 0; i < N; i++){
	sum += T[i];
      }
      printf("%s\n", (sum-max_flow(s,t)) >0 ? "No":"Yes");
    }
    return 0;
}