  We obtain some asymptotic formulae (with power savings in their error terms)
for the number of quadruples in the Cartesian product of an arbitrary set $A
\subset \mathbf{R}$ and for the number of quintuplets in $A\times A$ for any
subset $A$ of the prime field $\mathbf{F}_p$. Also, we obtain some applications
of our results to incidence problems in $\mathbf{F}_p$.
