#include <iostream>
#include <vector>
#include <map>
#include <cstring>
#include <climits>
using namespace std;
 
typedef long long ll;

#define MAX_V 1000
#define INF 100000000000LL

ll V;
ll cap[MAX_V][MAX_V];
bool used[MAX_V];

ll dfs(ll v, ll g, ll f){
  if(v == g) return f;
  used[v] = true;

  for(ll i = 0; i < V; i++){
    ll c = cap[v][i];
    if(!used[i] && c > 0){
      ll d = dfs(i, g, min(f, c));

      if(d > 0){
        cap[v][i] -= d;
        cap[i][v] += d;
        return d;
      }
    }
  }
  return 0;
}

ll mf(ll s, ll g){
  ll flow = 0;
  for(;;){
    memset(used, 0, sizeof(used));
    ll f = dfs(s, g, INF);
    if(f == 0) return flow;
    flow += f;
  }
}

void add_edge(ll from, ll to, ll c){
  cap[from][to] = c;
  cap[to][from] = 0;
}

int main(){
  ll n, w;
  map<string,int> week;
 
  week["Sunday"] = 0;
  week["Monday"] = 1;
  week["Tuesday"] = 2;
  week["Wednesday"] = 3;
  week["Thursday"] = 4;
  week["Friday"] = 5;
  week["Saturday"] = 6;
 
  while(cin >> n >> w, n || w){
    memset(cap, -1, sizeof(cap));

    for(ll i = 0; i < 7; i++){
      add_edge(0, i + 1, w);
    }
 
    ll sum = 0;
 
    for(ll i = 0; i < n; i++){
      ll tn, cn;
      cin >> tn >> cn;
      add_edge(i + 8, n + 8, tn);
      sum += tn;
 
      for(ll j = 0; j < cn; j++){
        string s;
        cin >> s;
        ll from = week[s] + 1;
        add_edge(from, i + 8, w);
      }
    }

    V = n + 9;

    ll flow = mf(0, V - 1);

    if(flow == sum){
      cout << "Yes" << endl;
    }
    else{
      cout << "No" << endl;
    }
  }
}