(1,1 ), (1,12), (12,1),(12,12) will have degree = 3
(1,x),(x,1),(12,x),(x,12) will have degree = 5
2<=x<=11
Remaining will have degree = 8
Total (1,x) =10
Similarly (12,x) = 10
Total (x,1)= 10
Similarly (x,12) = 10
Remaining = 144-40-4= 100
Sum of degree = 2* Edges
4*3+ (10+10+10+10)*5 + 100*8 = 2* Edges
1012=2* Edges
Therefore, edges= 506