#include<stdio.h>

int main(void){
  int n=0,tmp=0;
  scanf("%d",&n);
  char buf[12];
  snprintf(buf,12,"%d",n);
  for(int i=0;i<strlen(buf);i++){
    tmp+=(buf[i]-'0');
  }
  if(n%tmp)printf("No\n");
  else printf("Yes\n");
  return 0;
}
