#include <stdio.h>
void main(int argc, char *argv[])
{
    int N, Sn, x, y;
    scanf("%d", &N);
    y = N;
    while (N)
    {
        x = N % 10;
        Sn = Sn + x;
        N = N / 10;
    }
    if (y % Sn == 0)
        printf("Yes");
    else
        printf("No");
}