#include<stdio.h>
int yue_fen(int a,int b)
{
int z;
if(a==0)
z=b;
if(a<0)
a=-a;
if(b<0)
b=-b;
while(a!=0)
{
z=b%a;
b=a;
a=z;
}
return b;
}
int main(void)
{
int x,y;
printf("enter a fraction");
scanf("%d/%d",&x,&y);
x=x/yue_fen(x,y);
y=y/yue_fen(x,y);
printf("in lowest terms%d/%d",x,y);
return 0;
}