#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
struct edge{  ll to,cap,rev;};

vector<edge> G[110];

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

bool visited[110];
ll dfs(ll pos,ll ti,ll f){
  if(pos==ti)return f;
  if(visited[pos])return 0;
  visited[pos]=true;
  for(int i=0;i<(int)G[pos].size();i++){
    edge &e=G[pos][i];
    if(e.cap==0)continue;
    ll a=dfs(e.to,ti,min(f,e.cap));
    if(a==0)continue;
    e.cap-=a;
    G[e.to][e.rev].cap+=a;
    return a;
  }
  return 0;
}

ll max_flow(ll si,ll ti){
  ll res=0;
  while(1){
    memset(visited,false,sizeof(visited));
    ll f=dfs(si,ti,(1LL<<60));
    if(f==0)break;
    res+=f;
  }
  return res;
}

void init(){
  for(int i=0;i<110;i++)G[i].clear();
}

map<string,int> mp;
ll N,W;
int main(){
  mp["Sunday"]=0;
  mp["Monday"]=1;
  mp["Tuesday"]=2;
  mp["Wednesday"]=3;
  mp["Thursday"]=4;
  mp["Friday"]=5;
  mp["Saturday"]=6;

  while(1){
    cin>>N>>W;
    if(N==0&&W==0)break;
    init();
    ll si=7+N,ti=8+N,sum=0;
    for(int i=0;i<7;i++)add_edge(si,i,W);
    for(int i=0;i<N;i++){
      string str;
      ll t,c;
      cin>>t>>c;
      sum+=t;
      add_edge(7+i,ti,t);
      for(int j=0;j<c;j++){
        cin>>str;
        add_edge(mp[str],7+i,W);
      }
    }

    cout<< (max_flow(si,ti)==sum?"Yes":"No") <<endl;
  }
  return 0;
}