Yes answer will be 26 because a can have 5(0,1,2,3,4) values and b can have 5 values and 5*5 = 25 ordered pairs are possible with each distinct pair of class now by the rule of pigeonhole if we add 1 then there exist at least two pair which belong to the same class.
so total no of ordered pairs = 25 +1 =26