process.stdin.resume();
process.stdin.setEncoding('utf8');
 
// inputに入力データ全体が入る
function Main(input) {
  // 1行目がline1, 2行目がline2, …に入る
  var arg   = input.split("\n");
  var line0 = arg[0].split(" ");
  //var line1 = arg[1].split(" ");
  //var line2 = tmp[2].split(" ");
  //var line3 = tmp[3].split(" ");

  var input1 = Number(line0[0]);
  //var input2 = Number(line0[1]);
  //var input3 = Number(line0[2]);
  var n = String(input1);
//  var a = input2;
  //var b = input3;

  var ans = "initial_answer";
  //console.log( "[INPUT] "+ n +" "+ a +" "+ b + "");
  
  // LOGIC //
  ans = "No";
  var len = n.length;
  var fx = 0;
  for(var i=0; i<len; i++){
    fx += Number(n[i]);
    //console.log("fx: " + fx);
  }
  if(Number(n) % fx === 0) ans = "Yes";
  //console.log( "[INPUT] "+ n +" "+ fx +" "+ ans + "");

  console.log(ans);


  


}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
