Take $s=1$ for simplicity. Then this is a topological field theory of a 1-form gauge field $A$ and a 2-form gauge field $B$ coupled via
$$S = \frac{n}{2\pi} \int_M B \wedge \mathrm{d}A +\frac{pn}{4\pi} \int_M B \wedge B,$$
where $M$ is a closed 4-manifold.
Clearly the theory is invariant under ordinary gauge transformations of $A$,
$$A \to A + \mathrm{d}\lambda,$$
where $[\mathrm{d}\lambda]/2\pi \in H^1(M,\mathbb{Z})$. When $[\mathrm{d}\lambda]$ is trivial in cohomology (i.e. $\lambda$ is actually a globally defined function), call this a small gauge transformation; when it is non-trivial, call it a large gauge transformation. That is,
$$\oint_\Sigma \frac{\mathrm{d}\lambda}{2\pi} \in \mathbb{Z}$$
is zero for a small gauge transformation and non-zero for a large gauge transformation.
The theory is also invariant under "1-form" gauge transformations
$$B \to B + \mathrm{d} \eta\\
A \to A - p \eta,$$
where $\eta$ is a 1-form gauge field (and $p$ must therefore be an integer so that $A-p \eta$ is still a gauge field). Under this transformation the action is deformed by
$$\delta S = \frac{n}{2\pi} \int_M \mathrm{d}\eta \wedge \mathrm{d} A + \frac{pn}{4\pi} \int_M \mathrm{d}\eta \wedge \mathrm{d} \eta,$$
which may be written more suggestively as
$$\delta S = 2\pi n \int_M \frac{\mathrm{d}\eta}{2\pi} \wedge \frac{\mathrm{d} A}{2\pi} + \pi pn \int_M \frac{\mathrm{d}\eta}{2\pi} \wedge \frac{\mathrm{d} \eta}{2\pi}.$$
The integrals are $\mathbb{Z}$-valued, since $A$ and $\eta$ are gauge fields. For small gauge transformations, $\eta$ is globally defined, these integrals are zero, and the action is invariant. Including large gauge transformations, the first term will leave the path integral weight $e^{iS}$ invariant provided $n\in \mathbb{Z}$. For generic $M$ and $n$, the second term leaves the path integral invariant provided $p \in 2 \mathbb{Z}$. However, if $n$ is even, then $p$ may be any integer. Likewise, if it happens that the intersection form on $M$ is even (which will be the case if $M$ is spin),
$$\int_M \frac{\mathrm{d}\eta}{2\pi} \wedge \frac{\mathrm{d} \eta}{2\pi}\in 2\mathbb{Z},$$
then $p$ may again be any integer.
See Kapustin, Seiberg Coupling a QFT to a TQFT and Duality section 6 for more details, (and the rest of the paper for a nice discussion of these kinds of $BF$ theories).