program fy;
var a,b:array[1..10010]of longint;
n,s,i,sum:longint;
f:boolean;
procedure qs(l,r:integer);
var i,j,m,t:longint;
begin
i:=l;
j:=r;
m:=b[(l+r)div 2];
repeat
while b[i]<m do inc(i);
while b[j]>m do dec(j);
if i<=j then
begin
t:=a[i];
a[i]:=a[j];
a[j]:=t;
t:=b[i];
b[i]:=b[j];
b[j]:=t;
inc(i);
dec(j);
end;
until i>j;
if l<j then qs(l,j);
if i<r then qs(i,r);
end;
begin
assign(input,'toybrick.in');reset(input);
assign(output,'toybrick.out');rewrite(output);
readln(n,s);
while n<>0 do
begin
f:=true;
for i:=1 to n do
readln(a[i],b[i]);
qs(1,n);sum:=s;
for i:=1 to n do
begin
if sum<b[i] then
begin
writeln('NO');
f:=false;break;
end;
sum:=sum+a[i];
end;
if f then writeln('YES');
readln(n,s);
end;
close(input);
close(output);
end.