var
n,i:integer;
s:longint;
a,b,ta,tb:array[1..10000] of longint;
procedure swap(var a,b:integer);
begin
a:=a xor b;
b:=a xor b;
a:=a xor b;
end;
procedure msort(l,r:integer);
var
i,j,k,m:integer;
begin
if l=r then
exit;
m:=(l+r) div 2;
msort(l,m);
msort(m+1,r);
i:=l;
j:=m+1;
k:=l;
while (i<=m) and (j<=r) do
if b[i]<=b[j] then
begin
tb[k]:=b[i];
ta[k]:=a[i];
inc(k);
inc(i);
end
else
begin
tb[k]:=b[j];
ta[k]:=a[j];
inc(k);
inc(j);
end;
while i<=m do
begin
tb[k]:=b[i];
ta[k]:=a[i];
inc(i);
inc(k);
end;
while j<=r do
begin
tb[k]:=b[j];
ta[k]:=a[j];
inc(j);
inc(k);
end;
for i:=l to r do
begin
b[i]:=tb[i];
a[i]:=ta[i];
end;
end;
begin
assign(input,'toybrick.in');
assign(output,'toybrick.out');
reset(input);
rewrite(output);
//while not(eof) do
//begin
while true do
begin
read(n);
if n=0 then
exit;
readln(s);
for i:=1 to n do
readln(a[i],b[i]);
msort(1,n);
if s>=b[n] then
begin
writeln('YES');
continue;
end;
for i:=1 to n do
if s>=b[i] then
begin
if i=n then
begin
writeln('YES');
break;
end;
inc(s,a[i])
end
else
begin
writeln('NO');
break;
end;
end;
//end;
close(input);
close(output);
end.