#include <stdio.h>
int main() {
int i, j, k, a, b;
for (a = 3; a <= 1500; a++) {
for (i = 1, j = 0; i <= a; i++) {
if (a % i == 0) {
j += i;
}
}
for (b = 2; b <= a; b++) {
for (i = 1, k = 0; i <= b; i++) {
if (b % i == 0) {
k += i;
}
}
if (j == b && k == a) {
for (i = 2; i <= a; i++) {
if (a % i == 0) {
}
}
for (i = 2; i <= b; i++) {
if (b % i == 0) {
}
}
}
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCBpLCBqLCBrLCBhLCBiOwoKICAgIGZvciAoYSA9IDM7IGEgPD0gMTUwMDsgYSsrKSB7CiAgICAgICAgZm9yIChpID0gMSwgaiA9IDA7IGkgPD0gYTsgaSsrKSB7CiAgICAgICAgICAgIGlmIChhICUgaSA9PSAwKSB7CiAgICAgICAgICAgICAgICBqICs9IGk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZm9yIChiID0gMjsgYiA8PSBhOyBiKyspIHsKICAgICAgICAgICAgZm9yIChpID0gMSwgayA9IDA7IGkgPD0gYjsgaSsrKSB7CiAgICAgICAgICAgICAgICBpZiAoYiAlIGkgPT0gMCkgewogICAgICAgICAgICAgICAgICAgIGsgKz0gaTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaiA9PSBiICYmIGsgPT0gYSkgewogICAgICAgICAgICAgICAgcHJpbnRmKCIlZDoxXG4iLCBhKTsKICAgICAgICAgICAgICAgIGZvciAoaSA9IDI7IGkgPD0gYTsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGEgJSBpID09IDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCIlZFxuIiwgaSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcHJpbnRmKCIlZFxuXG4iLCBqKTsKCiAgICAgICAgICAgICAgICBwcmludGYoIiVkOjFcbiIsIGIpOwogICAgICAgICAgICAgICAgZm9yIChpID0gMjsgaSA8PSBiOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBpZiAoYiAlIGkgPT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBwcmludGYoIiVkXG4iLCBpKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBwcmludGYoIiVkXG5cbiIsIGspOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIDA7Cn0K