#include <bits/stdc++.h>
using ll = long long;
void bfs(const std::vector<std::vector<int>> &adjr, std::vector<int> &dist,
         int start) {
  std::queue<int> q;
  int n = dist.size();
  q.push(start);
  std::vector<bool> visited(n, false);
  visited[start] = true;
  while (!q.empty()) {
    int cur_node = q.front();
    q.pop();
    for (auto &next_node : adjr[cur_node]) {
      if (!visited[next_node]) {
        dist[next_node] = dist[cur_node] + 1;
        q.push(next_node);
        visited[next_node] = true;
      }
    }
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n, m;
  std::cin >> n >> m;
  std::vector<std::vector<int>> adj(n), adjr(n);
  for (int i = 0; i < m; ++i) {
    int u, v;
    std::cin >> u >> v;
    --u, --v;
    adj[u].push_back(v);
    adjr[v].push_back(u);
  }
  int k;
  std::cin >> k;
  std::vector<int> path(k);
  for (int i = 0; i < k; ++i) {
    std::cin >> path[i];
    --path[i];
  }
  std::vector<int> dist(n);
  bfs(adjr, dist, path[k - 1]);
  int maxi = 0, mini = 0;
  for (int i = 0; i < k - 1; ++i) {
    int cur_node = path[i];
    int next_node = path[i + 1];
    if (dist[next_node] + 1 != dist[cur_node]) {
      ++mini;
      ++maxi;
    } else {
      for (auto &node : adj[cur_node]) {
        if (node == next_node) {
          continue;
        }
        if (dist[node] + 1 == dist[cur_node]) {
          ++maxi;
          break;
        }
      }
    }
  }
  std::cout << mini << ' ' << maxi << '\n';
}
