#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <memory.h>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <map>
#include <cmath>
using namespace std;

#define rep(i, n) for(int i = 0; i< n; i++)
#define rep2(i, m, n) for(int i = m; i < n; i++)
typedef long long ll;
typedef pair<int, int> P;
const ll INF = 1LL << 55;
const double EPS = 1e-10;

struct edge{
  ll to;
  ll cap;
  ll rev;
  edge(){};
  edge(ll to, ll cap, ll rev){
    this->to = to;
    this->cap = cap;
    this->rev = rev;
  }
};

vector<edge> G[400];
ll level[400];
ll iter[400];

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

void bfs(int s){
  memset(level, -1, sizeof(level));
  level[s] = 0;
  queue<int> que;
  que.push(s);
  while(!que.empty()){
    ll v = que.front();que.pop();
    rep(i, (int)G[v].size()){
      edge &e = G[v][i];
      if(e.cap > 0 && level[e.to] < 0) {
	level[e.to] = level[v] + 1;
	que.push(e.to);
      }
    }
  }
}

ll dfs(ll v, ll t, ll f){
  if(v == t) return f;
  for(ll &i = iter[v]; i < (int)G[v].size(); i++){
    edge &e = G[v][i];
    if(e.cap > 0 && level[e.to] > level[v]){
      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(int s, int t){
  ll flow = 0, f;
  while(true){
    bfs(s);
    if(level[t] < 0) break;
    memset(iter, 0, sizeof(iter));
    while((f = dfs(s, t, INF)) > 0) flow += f;
  }
  return flow;
}

string days[] = {
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday",
  "Sunday",
};

int main(){
  ll N, c;
  ll W, need;
  string str;

  while(cin >> N >> W && (N || W)){
    rep(i, 400) G[i].clear();
    ll sum = 0;
    ll s = 7 + N;
    ll t = s + 1;
    rep(i, 7) add_edge(s, i, W);
    rep(i, N){
      cin >> need >> c;
      sum += need;
      add_edge(7 + i, t, need);
      rep(j, c){
	cin >> str;
	rep(k, 7) if(days[k] == str) add_edge(k, 7 + i, INF);
      }
    }
    ll num = max_flow(s, t);
    if(num == sum) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
  return 0;
}