Write a program that can find prime numbers.
Implement find_primes(n), which returns a list of every prime number less than or equal to n in ascending order. Return an empty list when n < 2. Use an algorithm suitable for values of n up to 1,000,000.
Function signature: find_primes(n). The input is an integer, and the output is a list of integers.
def find_primes(n):