  For a given $(X,S,\beta)$, where $S,\beta\colon X\times X\to X\times X$ are
set theoretical solutions of Yang-Baxter equation with a compatibility
condition, we define an invariant for virtual (or classical) knots/links using
non commutative 2-cocycles pairs $(f,g)$ that generalizes the one defined in
[FG2]. We also define, a group $U_{nc}^{fg}=U_{nc}^{fg}(X,S,\beta)$ and
functions $\pi_f, \pi_g\colon X\times X\to U_{nc}^{fg}(X)$ governing all
2-cocycles in $X$. We exhibit examples of computations achieved using GAP.
