On a piece of paper, we write down all positive integers $n$ such that all proper divisors of $n$ are less than $18$. We know that the sum of all numbers on the paper having exactly one proper divisor is $666$. What is the sum of all numbers on the paper having exactly two proper divisors? We say that $k$ is a proper divisor of the positive integer $n$ if $k | n$ and $1 < k < n$.
Problem
Source: 2020 Dürer Math Competition Finals Day2 E9 https://artofproblemsolving.com/community/c1622639_2020_
Tags: number theory, divisor