Advertisement
Ahmed_Negm

Untitled

Dec 6th, 2021
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4. void Ahmed_Negm(){
  5.   #ifndef ONLINE_JUDGE  
  6.     freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  7.   #endif
  8. }
  9. int main()
  10. {Ahmed_Negm();
  11. int x;
  12. cin >>x;
  13. int a = x/10;
  14. int b = x%10;
  15. if(a%b ==0 || b%a ==0){
  16.   cout<<"YES";
  17. }else
  18. cout<<"NO";
  19.  
  20.  
  21.  
  22.  
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement