import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; enum onePer = 30000; enum needExp = onePer * 100; void main() { auto N = readln.strip.to!int; int[] G, D; foreach (line; stdin.byLine) { auto input = line.split.to!(int[]); G ~= input[0]; D ~= input[1]; } auto plan = iota(N).map!(i => (G[i]-D[i]*onePer)*6>=needExp?i+1:0).filter!"a>0"; (plan.empty ? "NO" : ("YES" ~ plan.cycle.take(6).array.to!(string[])).join("\n")).writeln; }