This documentation is automatically generated by online-judge-tools/verification-helper
#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/problems/NTL_1_E"
#include "../../../template/template.hpp"
#include "../../../math/extgcd.hpp"
int main(){
ll a,b;
cin >> a >> b;
ll x,y;
ext_gcd(a, b, x, y);
cout << x << " " << y << "\n";
}
#line 1 "test/aoj/NTL/NTL_1_E.test.cpp"
#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/problems/NTL_1_E"
#line 1 "template/template.hpp"
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <bitset>
#include <cctype>
#include <climits>
#include <functional>
#include <cassert>
#include <numeric>
#include <cstring>
#define rep(i, n) for(int i = 0; i < (n); i++)
#define per(i, n) for(int i = (n) - 1; i >= 0; i--)
using ll = long long;
#define vi vector<int>
#define vvi vector<vi>
#define vl vector<ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
constexpr int mod = 1000000007;
using namespace std;
template<class T, class U>
bool chmax(T &a, const U &b){ return a < b ? (a = b, 1) : 0; }
template<class T, class U>
bool chmin(T &a, const U &b){ return a > b ? (a = b, 1) : 0; }
#line 4 "test/aoj/NTL/NTL_1_E.test.cpp"
#line 1 "math/extgcd.hpp"
ll ext_gcd(ll a, ll b, ll &x, ll &y){
ll d = a;
if(b){
d = ext_gcd(b, a % b, y, x);
y -= (a / b) * x;
}else{ x = 1; y = 0; }
return d;
}
#line 6 "test/aoj/NTL/NTL_1_E.test.cpp"
int main(){
ll a,b;
cin >> a >> b;
ll x,y;
ext_gcd(a, b, x, y);
cout << x << " " << y << "\n";
}