This documentation is automatically generated by online-judge-tools/verification-helper
#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/library/6/NTL/1/NTL_1_E"
#include "../../../src/template/template.hpp"
#include "../../../src/math/extgcd.hpp"
int main(void) {
ll a, b, x, y;
cin >> a >> b;
extgcd(a, b, x, y);
cout << x << ' ' << y << '\n';
}
#line 1 "verify/aizu_online_judge/ntl/extended_euclid_algorithm.test.cpp"
#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/library/6/NTL/1/NTL_1_E"
#line 2 "src/template/template.hpp"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<long long, long long>;
#define rep(i, a, b) for(long long i = (a); i < (b); ++i)
#define rrep(i, a, b) for(long long i = (a); i >= (b); --i)
constexpr long long inf = 4e18;
struct SetupIO {
SetupIO() {
ios::sync_with_stdio(0);
cin.tie(0);
cout << fixed << setprecision(30);
}
} setup_io;
#line 2 "src/math/extgcd.hpp"
constexpr long long extgcd(const long long a, const long long b, long long& x, long long& y) {
long long d = a;
if(b != 0) {
d = extgcd(b, a % b, y, x);
y -= (a / b) * x;
} else {
x = 1;
y = 0;
}
return d;
}
#line 4 "verify/aizu_online_judge/ntl/extended_euclid_algorithm.test.cpp"
int main(void) {
ll a, b, x, y;
cin >> a >> b;
extgcd(a, b, x, y);
cout << x << ' ' << y << '\n';
}