program toybrick;
type children=record
have:longint;
need:longint;
end;
var
a,b,n,s,k:longint;
toy:array[1..10001]of children;
flag:boolean;
procedure qsort(l,r:longint);
var
i,j,mid:longint;
p:children;
begin
i:=l;
j:=r;
mid:=toy[(l+r)div 2].need;
repeat
while toy[i].need<mid do
inc(i);
while toy[j].need>mid do
dec(j);
if i<=j then
begin
p:=toy[i];
toy[i]:=toy[j];
toy[j]:=p;
inc(i);
dec(j);
end;
until i>j;
if l<j then qsort(l,j);
if i<r then qsort(i,r);
end;
begin
assign(input,'toybrick.in');reset(input);
assign(output,'toybrick.out');rewrite(output);
readln(n,s);
while n<>0 do
begin
flag:=true;
for k:=1 to n do
readln(toy[k].have,toy[k].need);
qsort(1,n);
for k:=1 to n do
begin
if s-toy[k].need<0 then
begin
flag:=false;
end;
s:=s+toy[k].have;
end;
if flag then
writeln('YES')
else writeln('NO');
readln(n,s);
end;
close(input);close(output);
end.