
#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <algorithm>
#include <map>

using namespace std;

int solve(void);
void search(vector<vector<int>> &v, vector<int> &pos, vector<int> &count, vector<int> &numlist, map<int,int> inlist, int d);
void debug_output(vector<vector<int>> &v);

int main(void) {

	//FILE *fpin = freopen("data.txt", "r", stdin);
	while(solve()){}
	//while (1) {}
	return 0;

}

int solve(void) {

	int n, d;
	cin >> n >> d;
	if (!(n | d)) { return 0; }
	vector<vector<int>> v(n);
	vector<int> count(1000000+1,0);
	vector<int> numlist;
	map<int, int> invnumlist;
	vector<int> pos(n);

	for (int i = 0; i < n; i++) {
		int c;
		cin >> c;
		v[i].resize(c+1);
		v[i][0] = 0;
		pos[i] = c;
		for (int j = 1; j <= c; j++) {
			cin >> v[i][j];
			if (j > 0) v[i][j] += v[i][j - 1];
		}
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < v[i].size(); j++) {
			count[v[i][j]] ++;
		}
	}

	for (int i = 0; i < count.size(); i++) {
		if (count[i] > 0) {
			invnumlist[i] = numlist.size();
			numlist.push_back(i);
		}
	}
	
	search(v, pos, count, numlist, invnumlist, d);

	int ans = 0;
	for (int i = 0; i < n; i++) {
		ans += pos[i];
	}
	if (ans == 0) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 1;

}

void search(vector<vector<int>>& v, vector<int>& pos, vector<int>& count, vector<int>& numlist, map<int, int> inlist, int d)
{
	bool b = true;
	int low = 10000000, high = numlist.size() - 1;

	for (int i = 0; i < v.size(); i++)
		low = min(v[i][pos[i]], low);

	low = inlist[low];

	while (b) {

		b = false;

		//??´??°??????
		/*
			i??????j?????????????????????????????????????????????
		*/
		for (int i = 0; i < v.size(); i++) {
			for (int j = pos[i]; j > 0; j--) {
				if (count[numlist[high]] == 1 && v[i][j] == numlist[high]) {
				
					/*
						??????????????¨high?????´??°???????????´???
					*/
					int next = v[i][j - 1];
					int k = high - 1;
					for (; k >= 0 && (count[numlist[k]] == 0); k--);
					if ( abs(numlist[k] - min(numlist[low], next)) <= d) {
						high = k;
						low = min(low, inlist[next]);
						count[v[i][j]]--;
						pos[i] = j - 1;
						b = true;
					}
					else {
						break;
					}
				}
				else {
					/*
						??????????????¨high?????´??°??????????????´???
					*/
					if ( abs(numlist[high] - min(numlist[low], v[i][j - 1])) <= d) {
						//???????????????
						low = min(low, inlist[v[i][j - 1]]);
						pos[i] = j - 1;
						count[v[i][j]] --;
						b = true;
					}
					else {
						//??????????????????
						break;
					}
				}
			}
		}
	}
}


void debug_output(vector<vector<int>>& v)
{
	for (int i = 0; i < v.size(); i++) {
		for (int j = 0; j < v[i].size(); j++) {
			cout << v[i][j] << " ";
		}
		cout << endl;
	}
}