Solve SRM 158, Div 2, Problem TireRotation