# How can we determine if two discret logarithms are equal?

Let $p$ be a prime number, and let $g_{1},g_{2},...,g_{n}$ be $n$ generator of $Z^{*}_{p}$, we have a list $y_{1},y_{2},...,y_{n}$ of elements in $Z^{*}_{p}$ such that for every $i\in \lbrace1,2,...,n \rbrace$ we have $y_{i}=g_{i}^{x_{i}}\;mod\;p$ for some number $x_{i}$ (but we don't know $x_{i}$). I am trying to find an algorithm to determine all pairs $(y_{i},y_{j}), i\neq j$ such that $x_{i}=x_{j}$.