function Main(input) {
  var s = input.split('');

  for (var i = 0; i < s.length; i++) {
    s += s[i];
  }

  if(input % s === 0) {
    console.log('Yes');
  } else {
    console.log('No');
  }

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
