#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

typedef unsigned long long ull;

// MODIFIED EUCLIDE-BEZOUT ALGORITHM
// computes the GCD and the minimum h>0 such that a*k + b*h == N
// (thus 0 < h <= a/GCD and 0 <= k <= N/a), without any integer overflows
// if a < b, it minimizes k instead so that k+h is always minimum
void euclide_bezout(ull a, ull b, ull N, ull& GCD, ull& k, ull& h) {
    if (a < b) {
        euclide_bezout(b, a, N, GCD, h, k);
        return;
    }
    if (b == 0) {
        assert(N % a == 0); // otherwise, the problem is unsolvable
        GCD = a;
        k = N/a;
        h = 1;
        return;
    }
    euclide_bezout(b, a % b, N, GCD, h, k);
    // overflow check -- works if solution exists since k minimum (hence h maximum)
    assert(k * (a/b) <= h);
    h -= k * (a/b); // makes coefficients work for a, b
    ull x = (h-1) / (a/GCD); // reduces h as much as possible
    k += x * (b/GCD);
    h -= x * (a/GCD);
    // checks correctness
    assert(0 < k and k <= N/a);
    assert(0 < h and h <= a/GCD);
    assert(k * a + h * b == N);
}

int main() {
    ull N, C1, C2, GCD, a, b;
    assert(3 == scanf("%llu %llu %llu", &N, &C1, &C2));

    euclide_bezout(C1, C2, N, GCD, a, b);

    printf("%llu %llu\n", a, b);
    return 0;
}
