A paper company needs to ship paper to a large printing business. The paper will be shipped in small boxes and large boxes. Each small box of paper weighs 35 pounds and each large box of paper weighs 65 pounds. A total of 22 boxes of paper were shipped weighing 1040 pounds altogether. Determine the number of small boxes shipped and the number of large boxes shipped.