Exact distribution of cluster size and perimeter for two-dimensional percolation