Insert rows based on line numbers

Can I insert rows based on line numbers. Say If I need to insert 1 or more rows in a file from line number 10. Can I do that in UNIX

I have a file something like

A
B
C 
D
E
F

After row C, I wanted to add 2 records as X and Y. I have the line number after C as my reference. Can I insert a row after C where my reference would be line number 4

awk 'NR==4 {print "X"
                  print "Y"}
       {print $0} ' inputfile > tmp
mv tmp inputfile

If you want to pass explicitly the line numbers and the values to print

 
awk -v va1=4 -v pr1="X" -v pr2="Y" 'NR == va1 {print pr1"\n"pr2} {print }' input_file.txt