#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const double EPS = 1e-8;
typedef pair<ll,ll> P;
const ll INF = (1000000000000000LL);
const ll MAX_V = 1000;
 
 
//テヲツ慊?・ツ、ツァテヲツオツ?Ford-Fulkerson O(F|E|)
  
struct edge{ll to,cap,rev;};
  
vector<edge> G[MAX_V];
bool used[MAX_V];
  
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 < (ll)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 maxflow(ll s,ll t){
  ll flow = 0;
  for(;;){
    memset(used,0,sizeof(used));
    ll f = dfs(s,t,INF);
    if(f == 0)return flow;
    flow += f;
  }
}

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

ll getday(string s){
  for(ll i=0;i<7;i++) if( s == weeks[i] ) return i;
  assert(false);
}
 

ll N,W;
int main(){
  while( cin >> N >> W && (N|W) ){    
    ll sum = 0;
    int s = N+7, t = N+8;
    for(ll i=0;i<N;i++){
      ll t,c;
      cin >> t >> c;
      sum += t;
      for(ll j=0;j<c;j++){
        string m; 
        cin >> m;
        int d = getday(m);
        add_edge( i, N+d, INF );
      }
      add_edge(s,i,t);      
    }
    for(int i=0;i<7;i++)
      add_edge( N+i, t, W );
    
    if( maxflow( s,t ) == sum ) cout << "Yes" << endl;
    else cout << "No" << endl;
  }
}