#include using namespace std; int main() { long long a,b,r; cin>>a; cin>>b; r=a%b; while(r) { a=b; b=r; r=a%b; } cout<