If doing a little bit of manual work, you can use a text editor: In any decent text editor (e.g. Notepad++), use regex to find/replace, e.g.
replace with
will transform
Code:
some header line
456 789456
789 456987
to
Code:
some header line
PRP=456,2,789456,-1
PRP=789,2,456987,-1
If you need it to be an automated script, you might do something like this pseudo-Python:
Code:
for line in read(input_file):
# if it's an actual line and not a header
k, n = split(line)
print('PRP={},2,{},-1', k, n)