#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

const long long INF = LLONG_MAX / 4;

class Edge
{
public:
    int to, rev;
    long long cap;
    Edge(){};
    Edge(int to0, long long cap0){to = to0; cap = cap0;}
    Edge(int to0, long long cap0, int rev0){to = to0; cap = cap0; rev = rev0;}
};

long long maxFlow(const vector<vector<Edge> >& edges0, int source, int sink)
{
    static vector<vector<Edge> > edges;
    static vector<unsigned> index;
    static vector<int> level;
    static int n;

    class Func{
    public:
        static void bfs(int s){
            level.assign(n, -1);
            queue<int> q;
            level[s] = 0;
            q.push(s);
            while(!q.empty()){
                int v = q.front();
                q.pop();
                for(unsigned i=0; i<edges[v].size(); ++i){
                    Edge& e = edges[v][i];
                    if(e.cap > 0 && level[e.to] < 0){
                        level[e.to] = level[v] + 1;
                        q.push(e.to);
                    }
                }
            }
        }
        static long long dfs(int s, int t, long long f){
            if(s == t)
                return f;
            for(unsigned& i=index[s]; i<edges[s].size(); ++i){
                Edge& e = edges[s][i];
                if(e.cap > 0 && level[s] < level[e.to]){
                    long long g = dfs(e.to, t, min(f, e.cap));
                    if(g > 0){
                        e.cap -= g;
                        edges[e.to][e.rev].cap += g;
                        return g;
                    }
                }
            }
            return 0;
        }
    };

    n = edges0.size();
    edges.assign(n, vector<Edge>());
    for(int i=0; i<n; ++i){
        for(unsigned j=0; j<edges0[i].size(); ++j){
            const Edge& e = edges0[i][j];
            edges[i].push_back(Edge(e.to, e.cap, edges[e.to].size()));
            edges[e.to].push_back(Edge(i, 0, edges[i].size()-1));
        }
    }

    long long ret = 0;
    for(;;){
        Func::bfs(source);
        if(level[sink] < 0)
            return ret;
        index.assign(n, 0);
        long long f;
        while((f = Func::dfs(source, sink, INT_MAX)) > 0)
            ret += f;
    }

    return 0;
}

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


    for(;;){
        int n;
        long long w;
        cin >> n >> w;
        if(n == 0)
            return 0;

        long long sum = 0;
        vector<vector<Edge> > edges(n+9);
        for(int i=1; i<=7; ++i)
            edges[0].push_back(Edge(i, w));
        for(int i=0; i<n; ++i){
            long long t;
            int c;
            cin >> t >> c;
            sum += t;
            for(int j=0; j<c; ++j){
                string s;
                cin >> s;
                edges[index[s]].push_back(Edge(i+8, INF));
            }
            edges[i+8].push_back(Edge(n+8, t));
        }

        if(maxFlow(edges, 0, n+8) == sum)
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
}