http://webwork.maa.org/wiki/MultiAnswerProblems#.VMWBVFWJOuY
I would use MultiAnswer. Then you're linking those two answers, and you can return [1,1] if $f1stu-$f2stu = pi and return [0,0] otherwise. Or maybe return [1,0], since the upper limit can be anything and that way the student doesn't think they have to change both answers.