The treatment of a certain viral disease requires a combination dose of drugs D1 and D2. Each unit of D1 contains 1 milligram of factor X and 2 milligrams of factor Y, and each unit of D2 contains 2 milligrams of factor X and 3 milligrams of factor Y. If the most effective treatment requires 13 milligrams of factor X and 22 milligrams of factor Y, how many units of D1 and D2 should be administered to the patient?