#include <iostream>
#include <vector>

int main() {
    int k, l, m;
    std::cin >> k >> l >> m;

    std::vector<std::pair<int, int>> multiples;

    if (k % l == 0) multiples.push_back({k, l});
    if (k % m == 0) multiples.push_back({k, m});
    if (l % k == 0) multiples.push_back({l, k});
    if (l % m == 0) multiples.push_back({l, m});
    if (m % k == 0) multiples.push_back({m, k});
    if (m % l == 0) multiples.push_back({m, l});

    for (const auto& pair : multiples) {
        std::cout << pair.first << " " << pair.second << std::endl;
    }

    return 0;
}

