# Decrypting an Affine Cipher with known characters

I am trying to cryptanalyse multiple cipher–texts that I know are encrypted by different Affine ciphers. I have already analysed the frequency that each character occurs, and compared it to a frequency table of the languages the plain-texts could be in and as a result have a pretty decent idea of what a few characters could correspond to. For example I know in one cipher-text:

X = e, S = t, V = s

Converting those into their numerical correspondences yields

23 = 4, 18 = 19, 21 = 18

I have therefore deduced that:

$4a+b=23 \pmod{26}$

$19a+b=18 \pmod{26}$

$18a+b=21 \pmod{26}$

I figure I could probably calculate the values of a and b by manually trying every iteration of a (which wouldn't be terrible since I can rule out all even values) and hoping once they all match with the same b it works for all characters, but I was just wondering if there was a faster/more reliable way of doing it Mathematically. Is there some way I can solve for $a$ and $b$ that I am unaware of?

If you subtract equation 3 from equation 2, you get $a=-3$, and can solve for $b=75$. This fits equation 2 and 3, but not equation 1. So, no solution exists.