#include<stdio.h>
int main()
{
    int a,b;
    printf("enter two numbers:");
    scanf("%d%d", &a, &b);
    if(a<=0||b<=0)
    {
        printf("Invalid Input");
        return 0;
    }
    int x=a;
    int y=b;
    int temp;
    
    while(y!=0)
    {
        temp=y;
        y=x % y;
        x=temp;
    }
    int gcd=x;
    long long int lcm= (long long)a*b
   
    printf("GCD: %d\n",gcd);
    printf("LCM: %lld\n",lcm);
   
   // printf("%d ",LCM);
    return 0;
}