#include <bits/stdc++.h>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)

constexpr long long Inf = numeric_limits<long long>::max() / 4;
typedef long long ll;

namespace flow_algorithm
{
  template<class Flow>
  struct edge
  {
    int to;
    Flow cap, rev;
  };
  
  /*
  template<class Flow>
  using edges = vector<edge<Flow>>;
  
  template<class Flow>
  using graph = vector<edges<Flow>>;
  */
  typedef vector<edge<ll>> edges;
  typedef vector<edges> graph;
  
  template<class Flow>
  class ford_fulkerson
  {
  private:
    
    int V;
    //    graph<Flow> g;
    graph g;
    vector<bool> used;
    
    //   Flow static constexpr Inf = numeric_limits<Flow>::max() / 4;
    
  private:
    
    Flow dfs(int curr, int tar, Flow flow) {
      if(curr == tar) { return flow; }
      used[curr] = true;
      rep(i, g[curr].size()) {
        edge<Flow>& e = g[curr][i];
        if(!used[e.to] && e.cap > 0) {
          Flow d = dfs(e.to, tar, min(flow, e.cap));
          if(d <= 0) { continue; }
          e.cap -= d;
          g[e.to][e.rev].cap += d;
          return d;
        }
      }
      return 0;
    }
    
  public:
    
    ford_fulkerson(int V_)
    {
      V = V_;
      g.resize(V_);
      used.resize(V_);
    }
    
    void add_edge(int from, int to, Flow cap)
    {
      g[from].push_back({to, cap, (Flow)g[to].size()});
      g[to].push_back({from, 0, (Flow)g[from].size()-1});
    }
    
    Flow max_flow(int s, int t)
    {
      Flow ret = 0;
      for(;;) {
        rep(i, V) used[i] = false;
        Flow f = dfs(s, t, Inf);
        if(f == 0) { return ret; }
        ret += f;
      }
    }
    
  };
}

int const SBASE = 10;
int const SRC = 150, SINK = 151;

int main() {
  
  map<string, int> mp = {
    {"Monday",0},
    {"Tuesday", 1},
    {"Wednesday", 2},
    {"Thursday", 3},
    {"Friday", 4},
    {"Saturday", 5},
    {"Sunday", 6}
  };
  
  int N; ll W;
  while(cin >> N >> W && (N|W)) {
    flow_algorithm::ford_fulkerson<ll> ff(200);
    
    rep(i, 7) ff.add_edge(SRC, i, W);
    
    ll need = 0;
    
    rep(i, N) {
      ll t; int c; cin >> t >> c;
      need += t;
      rep(j, c) {
        string s; cin >> s;
        //        dn.add_edge(mp[s], SBASE+i, flow_algorithm::dinic<ll>::Inf);
        ff.add_edge(mp[s], SBASE+i, Inf);
      }
      ff.add_edge(SBASE+i, SINK, t);
    }
    
    cout << ( ff.max_flow(SRC, SINK) == need ? "Yes" : "No" ) << endl;
    
  }
  
  return 0;
}