(B) A foreign medical school and has had at least two years of residency in a program accredited by the Accreditation Council for Graduate Medical Education or the American Osteopathic Association, or has had at least two years of residency in a program in Canada that has been accredited for the training of resident physicians by the Royal College of Physicians and Surgeons of Canada, or by the College of Family Physicians of Canada; and:(i) Holds the national certificate of the Educational Commission for Foreign Medical Graduates, or its successor, or for applicants with residency training in Canada, has passed with scores deemed satisfactory by the board, the Medical Council of Canada Evaluating Examination, or its successor; or(ii) Holds the certificate of the Fifth Pathway Program of the American Medical Association; provided that for a period of two years after June 26, 2004, the requirements of subsection (b)(2)(B)(i) and (ii) shall not apply to any applicant who has had four years of residency in a program accredited by the Accreditation Council for Graduate Medical Education or the American Osteopathic Association and who has passed, with scores deemed satisfactory by the board, the Special Purpose Examination (SPEX).