Confused about modular notations I am little confused about the notations used in two articles at wikipedia. 
According to the page on Fermat Primality test
$
a^{p-1}\equiv 1 \pmod{m}$ means that when $a^{p-1}$ is divided by $m$, the remainder is 1. 
And according to the page on Modular Exponential
$c \equiv b^e \pmod{m}$ means that when $b^e$ is divided by $m$, the remainder is $c$. 
Am I interpreting them wrong? or both of them are right? Can someone please clarify them to me? 
Update: So given an equation say $x \equiv y \pmod{m}$, how do we interpret it? $y$ divided by $m$ gives $x$ as remainder or $x$ divided by $m$ gives $y$ as remainder? 

It's a bit of a weird notation, but you should consider the ≡ and the (mod m) as a single unit. X ≡ Y (mod m) means that the two numbers/expressions X and Y are equal when you take the  remainder mod m. 
