Fix input convention (r,c)->(x,y) to close #2
Change output format as discussed in #1