Compute the smallest positive integer $x$ which satisfies the following congruences:

1. $x^2 - 8x + 1 \equiv 0 \pmod{22}$
2. $x^2 - 22x + 1 \equiv 0 \pmod{8}$

Let's think step by step and output the final answer within \boxed{}.
user