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

typedef long long ll;

class Edge{
public:
  ll to, cap, rev;
  Edge(){}
  Edge(ll to, ll cap, ll rev) :
    to(to), cap(cap), rev(rev) {}
};

vector<Edge> G[1000];
bool used[1000];

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

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

  for(ll 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 max_flow(ll s, ll t){
  ll flow = 0;

  while(true){
    memset(used, 0, sizeof(used));
    ll f = dfs(s, t, LONG_LONG_MAX);
    if(f == 0) return flow;
    flow += f;
  }
}

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){
    for(ll i = 0; i < 1000; i++){
      G[i].clear();
    }

    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);
      }
    }

    ll flow = max_flow(0, n + 8);

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