Let p ≥ 3 be a prime, $S\subseteq {\mathbb{F}}_{p}^{2}$S \subseteq \mathbb{F}_p^2 a nonempty set, and $w:{\mathbb{F}}_{p}^{2}\to R$w:\mathbb{F}_p^2 \to R a function with supp w = S. Applying an uncertainty inequality due to András Bíró and the present author, we show that there are at most $\frac{1}{2}\left|S\right|${1 \over 2}\left| S \right| directions in ${\mathbb{F}}_{p}^{2}$\mathbb{F}_p^2 such that for every line l in any of these directions, one has

$\sum _{z\in l}w\left(z\right)=\frac{1}{p}\sum _{z\in {\mathbb{F}}_{p}^{2}}w\left(z\right),$\sum\limits_{z \in l} {w\left( z \right) = {1 \over p}\sum\limits_{z \in \mathbb{F}_p^2} {w\left( z \right),} }
except if S itself is a line and w is constant on S (in which case all, but one direction have the property in question). The bound $\frac{1}{2}\left|S\right|${1 \over 2}\left| S \right| is sharp.

As an application, we give a new proof of a result of Rédei-Megyesi about the number of directions determined by a set in a finite affine plane.