#include <bits/stdc++.h>
using namespace std;
long long int INF = 9e18;
long long int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int test_case = 1;
  while (test_case--) {
    long long int n, m, i, j, t;
    scanf("%lld%lld", &n, &m);
    long long int on = 1, ot = n;
    while (1) {
      for (i = 0; i < m; i++) {
        printf("%lld %lld\n", on, i + 1);
        if (on == ot) {
          if (m % 2 != 0 && m / 2 == i)
            break;
          else if (m % 2 == 0 && i + 1 == m / 2) {
            printf("%lld %lld\n", on, i + 2);
            break;
          }
        }
        printf("%lld %lld\n", ot, m - i);
      }
      if (((n % 2 == 0 && ot == on + 1)) || (n % 2 != 0 && on == ot)) break;
      on++;
      ot--;
    }
  }
}
