package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func main() { var scan *bufio.Scanner scan = bufio.NewScanner(os.Stdin) scan.Scan() stringInput := scan.Text() number, err := strconv.Atoi(strings.TrimSpace(stringInput)) if err != nil { panic(err) } var divisorList []int for i := 1; i <= number; i++ { if number%i == 0 { divisorList = append(divisorList, i) } } sum := Sum(divisorList) if sum == number*2 { fmt.Print("Yes") } else { fmt.Print("No") } } func Sum(numList []int) int { var sum int for _, value := range numList { sum += value } return sum }