#include #define Ms(a,b) memset(a,b,sizeof a) #define db(x) cout<<#x<<"="<t2)puts("1/0"); else printf("%d/%d\n",a[t1]/__gcd(a[t1],b[t2]),b[t2]/__gcd(a[t1],b[t2])); } return 0; }