2 added 51 characters in body
source | link

this is a job for awk

awk '(NR%50>14NR%50==15) &&|| (NR%50<26NR%50==25)' inputfile

edit: I was mislead by sed instruction in OP.

this is a job for awk

awk '(NR%50>14) && (NR%50<26)' inputfile

this is a job for awk

awk '(NR%50==15) || (NR%50==25)' inputfile

edit: I was mislead by sed instruction in OP.

1
source | link

this is a job for awk

awk '(NR%50>14) && (NR%50<26)' inputfile