#include<bits/stdc++.h>
#include<iostream> 
#include<set> 
#include<queue>
#include<vector>
#include<list>
#include<stack>
#define me(a,b) memset(a,b,sizeof(a));
#define ios ios::sync_with_stdio(0); cin.tie(0),cout.tie(0); 
using namespace std;
typedef long long ll;
const int N = 1e7+7;
const double eps = 1e-7;
const double pi=3.1415926;
const ll mod =1000003;

int main(){
	ll a,b,c;
	int x,y,z;
	cin>>a>>b;
	ll arr[200005];
	ios
	for(int i=0;i<200005;i++){
		arr[i]=0;
	}
	for(int i=1;i<=a;i++){
		cin>>x>>y>>z;
		arr[x]+=z;
		arr[y]-=z;
	}
	ll sum=0;
	for(int i=0;i<200005;i++){
		sum+=arr[i];
		if(sum>b){
			cout<<"No";
			return 0;
		}
	}
	cout<<"Yes";
	return 0;
}
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
using ll = long long;

int main() {
    int n, m; cin >> n >> m;
    int a[n], b[m];
    rep(i, n) cin >> a[i]; 
    rep(i, m) cin >> b[i];

    set<int> ans;
    

    rep(i, n){
        bool flag = true;
        rep(j, m){
            if(a[i] == b[j]) flag = false;
        }
        if(flag) ans.insert(a[i]);
    }
    rep(j, m){
        bool flag = true;
        rep(i, n){
            if(a[i] == b[j]) flag = false;
        }
        if(flag) ans.insert(b[j]);
    }
    for(auto x:ans) cout << x << ' ';
    cout << endl;
}
