/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.stream.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
List<Integer> result = IntStream.rangeClosed(1, 10)
.boxed()
.flatMap((i) -> {
List<Integer> results = new ArrayList<>();
if (10 % i == 0) {
results.add(i);
if (i != 5) {
results.add(10 / i);
}
}
return results.stream();
})
.collect(Collectors.toList());
result.
forEach(System.
out::println
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwuc3RyZWFtLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUxpc3Q8SW50ZWdlcj4gcmVzdWx0ID0gSW50U3RyZWFtLnJhbmdlQ2xvc2VkKDEsIDEwKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5ib3hlZCgpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmZsYXRNYXAoKGkpIC0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJTGlzdDxJbnRlZ2VyPiByZXN1bHRzID0gbmV3IEFycmF5TGlzdDw+KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCWlmICgxMCAlIGkgPT0gMCkgewogICAgICAgIAkJCQkJCQkJcmVzdWx0cy5hZGQoaSk7CiAgICAgICAgCQkJCQkJCQlpZiAoaSAhPSA1KSB7CiAgICAgICAgICAgIAkJCQkJCQkJcmVzdWx0cy5hZGQoMTAgLyBpKTsKICAgICAgICAJCQkJCQkJCX0KICAgIAkJCQkJCQkJfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAlyZXR1cm4gcmVzdWx0cy5zdHJlYW0oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jb2xsZWN0KENvbGxlY3RvcnMudG9MaXN0KCkpOwogICAgICAgIHJlc3VsdC5mb3JFYWNoKFN5c3RlbS5vdXQ6OnByaW50bG4pOwoJfQp9