That's tough. I had a similar issue when I was filling out our paperwork - I had traveled outside of Canada several times for extended periods of time. I visited my husband in Austria for 3 months just recently, for example. However, my permanent place of residence has always been in Canada so I put no as my answer to that question. Now I'm wondering if I did that wrong! Because I did put the dates of my visit in as a period of time that we "cohabited" but I was not a resident of austria during that time, I was only there on a visitor visa.
I think your 2 years studying abroad probably counts as residing outside of Canada though. I'd include that for sure, because 2 years is quite a long time and it was to study and live there, not just on a visitor visa. For curiosity's sake, where did you study? I did a few weeks in Japan and it was awesome, I was really happy that I took the opportunity to study outside of Canada for some time.