1、B站视频链接:G05 最大公约数 欧几里得算法_哔哩哔哩_bilibili
题目链接:[NOIP2001 普及组] 最大公约数和最小公倍数问题 - 洛谷


#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
LL x,y,ans;
LL gcd(LL a,LL b){
	return b==0?a:gcd(b,a%b);
}
int main(){
	cin>>x>>y;
	LL t=x*y;
	for(LL i=1;i*i<=t;i++){
		if(t%i==0&&gcd(i,t/i)==x){
			ans+=2;
		}	
	}
	if(x==y)ans--;//相等则只有一对 
	cout<<ans;
	
	return 0;
}



















