function main(input) {
  const N = parseInt(input, 10);
  let AN = N;
  let S = 0;
  
  while(true) {
    if (AN < 1) {
      S += AN;
      break;
    }
    S += Math.floor(AN % 10);
    AN = Math.floor(AN / 10);
  }
  
  if (N % S === 0) {
    console.log('Yes');
  } else {
    console.log('No');
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));