#include <iostream>
#include <cmath>
using namespace std;
int main() {
// your code goes here
double diff = 1e300, l2 = log(2), l3 = log(3);
int M = 2000, bi = -1, bj = -1;
for (int i = 1; i < M; ++i)
for (int j = 1; j < M; ++j) {
if (abs(l2 * i - l3 * j) < diff) {
diff = abs(l2 * i - l3 * j);
bi = i;
bj = j;
}
}
printf("The difference between %.5lf * %d and %.5lf * %d is %.10lf\n", l2, bi, l3, bj, diff);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCQoJZG91YmxlIGRpZmYgPSAxZTMwMCwgbDIgPSBsb2coMiksIGwzID0gbG9nKDMpOwoJaW50IE0gPSAyMDAwLCBiaSA9IC0xLCBiaiA9IC0xOwoJZm9yIChpbnQgaSA9IDE7IGkgPCBNOyArK2kpCgkJZm9yIChpbnQgaiA9IDE7IGogPCBNOyArK2opIHsKCQkJaWYgKGFicyhsMiAqIGkgLSBsMyAqIGopIDwgZGlmZikgewoJCQkJZGlmZiA9IGFicyhsMiAqIGkgLSBsMyAqIGopOwoJCQkJYmkgPSBpOwoJCQkJYmogPSBqOwoJCQl9CgkJfQoJCglwcmludGYoIlRoZSBkaWZmZXJlbmNlIGJldHdlZW4gJS41bGYgKiAlZCBhbmQgJS41bGYgKiAlZCBpcyAlLjEwbGZcbiIsIGwyLCBiaSwgbDMsIGJqLCBkaWZmKTsKCQoJcmV0dXJuIDA7Cn0=