The sequence of integers in the row of squares and in each of the two columns of squares form three distinct arithmetic sequences. What is the value of N?
28 = N
21 22 23 24 25 26 27
25 26
26 25
27 24
23