Pagination at Neo4j DB level

I am not able to take the skip and limit from the WITH clause to paginate the response. I am writing the script as mentioned below. I am getting error.
Example:

WITH { "a": $a,
"b": $b,
"offset": $offset,
"pageLimit": $pageLimit
} as input,
{ statement1:
'match (n)-[:LIKES]->(m) where n.name=$input.a and n.age=$input.b return n,m order by n.age skip $input.offset limit $input.pageLimit'
} as statement
call apoc.cypher.run(statement.statement1,{input:input}) yield value return value.

Can someone help me here how to handle skip and limit which i taking as input in WITH cluase.

Cypher literal maps done have keys with are enclosed in quotes/double-quotes. Remove the quotes around the keys in your "input" map. You did it correctly in your "statement" map.