Here is an explanation for the input file for training, as it might be obvious to everyone and you must understand it to write your own:
4 2 1 <- header file saying there are 4 sets to read, with 2 inputs and 1 output
-1 -1 <- the 2 inputs for the 1st group
-1 <- the 1 output for the 1st group
-1 1 <- the 2 inputs for the 2nd group
1 <- the 1 output for the 2nd group
1 -1 <- the 2 inputs for the 3rd group
1 <- the 1 output for the 3rd group
1 1 <- the 2 inputs for the 4th group
-1 <- the 1 output for the 4th group