This takes advantage of the default awk action, which is to print the input line. This method simply accepts all lines except 1 and 5.
It can be generalized:
#!/bin/sh
while getopts s: arg; do
case $arg in
s) skip="$OPTARG"
esac
done
shift `expr $OPTIND - 1`
awk -v "sl=$skip" 'BEGIN {
split(sl, a, ",")
for (i in a) skip[a] = 1
}
!skip[NR]' "$1"