Vasyas bicycle chain drive consist part n star attach pedal axle m star attach rear wheel axle the chain help rotate rear wheel transmit pedal rotationWe know ith star pedal axle ai 0a1a2an teeth jth star rear wheel axle bj 0b1b2bm tooth any pair ij 1in1jm call gear set index star chain currently attach Gear ij gear ratio equal value since Vasya like integer wants find gear ij ratio integer on hand Vasya like fast drive integer gear ij wants choose gear maximum ratio help find number gearsin problem fraction denote division real number rounding perform