#include <string>
#include <queue>
#include <vector>
#include <algorithm>
using namespace std;

#define INF 100000000000

#define SOUR (M+7)
#define SINK (M+7+1)

class Node
{
public:	
	vector<int> to;
};

int main()
{
	int M;
	long long N;
	while(cin >> M >> N, (M||N))
	{
		Node n[150];
		long long flow[150][150]={0},cap[150][150]={0},all=0;
		
		for(int i=0; i<M; i++)
		{
			long long T,C;
			cin >> T >> C;
			n[SOUR].to.push_back(i);
			
			cap[SOUR][i]+=T;
			cap[i][SOUR]+=T;
			all+=T;
			
			while(C--)
			{
				string s;
				cin >> s;
				int p;
				if(s=="Sunday") 	p=0;
				if(s=="Monday") 	p=1;
				if(s=="Tuesday") 	p=2;
				if(s=="Wednesday") 	p=3;
				if(s=="Thursday")	p=4;
				if(s=="Friday")		p=5;
				if(s=="Saturday") 	p=6;
				
				n[i].to.push_back(M+p);
				n[M+p].to.push_back(i);
				
				flow[M+p][i]+=N;
				
				cap[i][M+p]+=N;
				cap[M+p][i]+=N;
			}
		}
		
		for(int i=0; i<7; i++)
		{
			n[M+i].to.push_back(SINK);
			cap[M+i][SINK]+=N;
		}
		
		long long total=0;
		while(1)
		{		
			int v[150];
			for(int i=0; i<=SINK; i++)
				v[i]=-1;
				
			v[SOUR]=SOUR;
			
			queue<int> q;
			q.push(SOUR);
			
			bool g=false;
			while(!q.empty())
			{
				int t=q.front(); q.pop();
				if(t==SINK)
				{
					g=true;
					break;
				}
				
				for(int i=0; i<n[t].to.size(); i++)
				{
					int next=n[t].to[i];
					if(flow[t][next]==cap[t][next]) continue;
					if(v[next]>=0) continue;
					
					v[next]=t;
					
					q.push(next);
				}
			}
			
			if(!g) break;
			
			long long f=INF;
			for(int j=SINK; v[j]!=j; j=v[j])
			{
				f=min(f,cap[v[j]][j]-flow[v[j]][j]);
			}
			
			total+=f;
			for(int j=SINK; v[j]!=j; j=v[j])
			{
				flow[v[j]][j]+=f;
				flow[j][v[j]]-=f;
			}
		}
		
		puts((all==total?"Yes":"No"));
	}
}