function main(input) {
  
  var input = input.toString().split('');
  var sum = 0;
  var answer = 'No';
  for (var i=0;i<input.length;i++){
   	sum += parseInt(input[i]);
  }
  if (sum % parseInt(input) == 0) {
  	answer = 'Yes';
  }
  console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));