<?php fscanf(STDIN,"%d",$n); $n = trim(fgets(STDIN)); $array = array(); for ($i=0; $i<$N; $i++){ $array[] = trim(fgets(STDIN)); } $total = 0; foreach ($array as $element){ $total += $element; } $ans = ($total % $n) == 0 ? 'Yes' : 'No'; echo $ans;