Given a set of vectors $V = \{v_1, v_2, \cdots, v_n\}, v_i \in \mathbb{Z}^2$.

Given a query $\vec{C} = (c_1, c_2), c_i \in \mathbb{Z}$, how can one quickly verify whether if there exists a subset $ S\subseteq V$, such that $\sum_{v \in S}v == \vec{C}$ ?

And I have a constraint on query $\vec{C}$ which only two forms are allowed $(0, \sum_{v\in V} v[1])$ or $=(\sum_{v\in V} v[0], 0)$

A brute force approach can be treating every dimension independently first and then somehow figure out a way to intersect both feasible regions.

1more comment