# include <stdio.h>
int main()
{
  int a,b,sum=0,temp=0,i;
  scanf("%d %d",&a,&b);
    for(i=1;i<a;i++){
        if(a%i==0){
            sum=sum+i;
        }
    }
    for(i=1;i<b;i++){
        if(b%i==0){
            temp=temp+i;
        }
    }
    if(sum==a && temp==b){
        printf("Friendly Number");
    }
    else{
        printf("Not Friendly Number");
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: