#include #include #include #define COST 30000 * 100 int main(){ int n; std::cin >> n; std::vector v(n); for(int i = 0; i < n; i++) { int death_penalty, exp; std::cin >> exp >> death_penalty; v.push_back(exp - death_penalty * 30000); } std::sort(v.rbegin(), v.rend()); if(v.front() * 6 < COST) std::cout << "NO" << std::endl; else{ std::cout << "YES" << std::endl; for (size_t i = 0; i < 6; i++) { std::cout << 1 << std::endl; } } return 0; }